/*------------------------------------------------------------------------------
 * MDK Middleware - Component ::USB:Device
 * Copyright (c) 2004-2024 Arm Limited (or its affiliates). All rights reserved.
 *------------------------------------------------------------------------------
 * Name:    usbd_config_def_3.h
 * Purpose: USB Device (USBD) - Device 3 Definitions
 *----------------------------------------------------------------------------*/

#ifndef USBD_CONFIG_DEF_3_H_
#define USBD_CONFIG_DEF_3_H_

#define USBD3_EP_MAX                       (0)

#define USBD3_DEV_STR_CNT                  (3+USBD3_STR_DESC_SER_EN)

#if    (defined(RTE_USB_Device_CustomClass_0) && (USBD_CUSTOM_CLASS0_DEV == 3))              // USB Device 3 Custom Class 0
#define USBD3_CUSTOM_CLASS0                 1
#define USBD3_CUSTOM_CLASS0_IAD_EN         (USBD_CUSTOM_CLASS0_IAD_EN)
#define USBD3_CUSTOM_CLASS0_IF_CNT        ((USBD_CUSTOM_CLASS0_IF0_EN*(USBD_CUSTOM_CLASS0_IF0_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS0_IF1_EN*(USBD_CUSTOM_CLASS0_IF1_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS0_IF2_EN*(USBD_CUSTOM_CLASS0_IF2_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS0_IF3_EN*(USBD_CUSTOM_CLASS0_IF3_ALT == 0)))
#define USBD3_CUSTOM_CLASS0_IF0_EP_CNT    ((USBD_CUSTOM_CLASS0_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF0_EP0_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP1_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP2_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP3_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP4_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP5_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP6_EN + \
                                            USBD_CUSTOM_CLASS0_IF0_EP7_EN))
#define USBD3_CUSTOM_CLASS0_IF0_EP_MSK    ((USBD_CUSTOM_CLASS0_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF0_EP0_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP1_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP2_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP3_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP4_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP5_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP6_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF0_EP7_EN * (1 << (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS0_IF1_EP_CNT    ((USBD_CUSTOM_CLASS0_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF1_EP0_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP1_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP2_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP3_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP4_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP5_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP6_EN + \
                                            USBD_CUSTOM_CLASS0_IF1_EP7_EN))
#define USBD3_CUSTOM_CLASS0_IF1_EP_MSK    ((USBD_CUSTOM_CLASS0_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF1_EP0_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP1_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP2_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP3_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP4_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP5_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP6_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF1_EP7_EN * (1 << (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS0_IF2_EP_CNT    ((USBD_CUSTOM_CLASS0_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF2_EP0_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP1_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP2_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP3_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP4_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP5_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP6_EN + \
                                            USBD_CUSTOM_CLASS0_IF2_EP7_EN))
#define USBD3_CUSTOM_CLASS0_IF2_EP_MSK    ((USBD_CUSTOM_CLASS0_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF2_EP0_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP1_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP2_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP3_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP4_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP5_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP6_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF2_EP7_EN * (1 << (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS0_IF3_EP_CNT    ((USBD_CUSTOM_CLASS0_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF3_EP0_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP1_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP2_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP3_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP4_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP5_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP6_EN + \
                                            USBD_CUSTOM_CLASS0_IF3_EP7_EN))
#define USBD3_CUSTOM_CLASS0_IF3_EP_MSK    ((USBD_CUSTOM_CLASS0_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS0_IF3_EP0_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP1_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP2_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP3_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP4_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP5_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP6_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS0_IF3_EP7_EN * (1 << (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS0_EP_CNT         (USBD3_CUSTOM_CLASS0_IF0_EP_CNT+USBD3_CUSTOM_CLASS0_IF1_EP_CNT+USBD3_CUSTOM_CLASS0_IF2_EP_CNT+USBD3_CUSTOM_CLASS0_IF3_EP_CNT)
#define USBD3_CUSTOM_CLASS0_EP_MSK         (USBD3_CUSTOM_CLASS0_IF0_EP_MSK|USBD3_CUSTOM_CLASS0_IF1_EP_MSK|USBD3_CUSTOM_CLASS0_IF2_EP_MSK|USBD3_CUSTOM_CLASS0_IF3_EP_MSK)
#define USBD3_CUSTOM_CLASS0_IF_DESC_CNT    (USBD_CUSTOM_CLASS0_IF0_EN+USBD_CUSTOM_CLASS0_IF1_EN+USBD_CUSTOM_CLASS0_IF2_EN+USBD_CUSTOM_CLASS0_IF3_EN)
#define USBD3_CUSTOM_CLASS0_STR_CNT        (USBD_CUSTOM_CLASS0_IF0_EN*USBD_CUSTOM_CLASS0_IF0_STR_EN+USBD_CUSTOM_CLASS0_IF1_EN*USBD_CUSTOM_CLASS0_IF1_STR_EN+USBD_CUSTOM_CLASS0_IF2_EN*USBD_CUSTOM_CLASS0_IF2_STR_EN+USBD_CUSTOM_CLASS0_IF3_EN*USBD_CUSTOM_CLASS0_IF3_STR_EN)
#define USBD3_CUSTOM_CLASS0_MS_COMPAT_CNT  (USBD_CUSTOM_CLASS0_IF0_EN*USBD_CUSTOM_CLASS0_IF0_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS0_IF1_EN*USBD_CUSTOM_CLASS0_IF1_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS0_IF2_EN*USBD_CUSTOM_CLASS0_IF2_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS0_IF3_EN*USBD_CUSTOM_CLASS0_IF3_OS_EXT_COMPAT_ID_EN)
#define USBD_CUSTOM_CLASS0_HS              (USBD3_HS)
#define USBD_CUSTOM_CLASS0_IF_CNT          (USBD3_CUSTOM_CLASS0_IF_CNT)
#define USBD_CUSTOM_CLASS0_IF0_EP_CNT      (USBD3_CUSTOM_CLASS0_IF0_EP_CNT)
#define USBD_CUSTOM_CLASS0_IF1_EP_CNT      (USBD3_CUSTOM_CLASS0_IF1_EP_CNT)
#define USBD_CUSTOM_CLASS0_IF2_EP_CNT      (USBD3_CUSTOM_CLASS0_IF2_EP_CNT)
#define USBD_CUSTOM_CLASS0_IF3_EP_CNT      (USBD3_CUSTOM_CLASS0_IF3_EP_CNT)
#define USBD_CUSTOM_CLASS0_EP_CNT          (USBD3_CUSTOM_CLASS0_EP_CNT)
#define USBD_CUSTOM_CLASS0_EP_MSK          (USBD3_CUSTOM_CLASS0_EP_MSK)
#define USBD_CUSTOM_CLASS0_IF_DESC_CNT     (USBD3_CUSTOM_CLASS0_IF_DESC_CNT)
#define USBD_CUSTOM_CLASS0_IF0_STR_IDX     (USBD_CUSTOM_CLASS0_IF0_STR_EN * (USBD3_DEV_STR_CNT))
#define USBD_CUSTOM_CLASS0_IF1_STR_IDX     (USBD_CUSTOM_CLASS0_IF1_STR_EN * (USBD3_DEV_STR_CNT+USBD_CUSTOM_CLASS0_IF0_EN*USBD_CUSTOM_CLASS0_IF0_STR_EN))
#define USBD_CUSTOM_CLASS0_IF2_STR_IDX     (USBD_CUSTOM_CLASS0_IF2_STR_EN * (USBD3_DEV_STR_CNT+USBD_CUSTOM_CLASS0_IF0_EN*USBD_CUSTOM_CLASS0_IF0_STR_EN+USBD_CUSTOM_CLASS0_IF1_EN*USBD_CUSTOM_CLASS0_IF1_STR_EN))
#define USBD_CUSTOM_CLASS0_IF3_STR_IDX     (USBD_CUSTOM_CLASS0_IF3_STR_EN * (USBD3_DEV_STR_CNT+USBD_CUSTOM_CLASS0_IF0_EN*USBD_CUSTOM_CLASS0_IF0_STR_EN+USBD_CUSTOM_CLASS0_IF1_EN*USBD_CUSTOM_CLASS0_IF1_STR_EN+USBD_CUSTOM_CLASS0_IF2_EN*USBD_CUSTOM_CLASS0_IF2_STR_EN))
#define USBD_CUSTOM_CLASS0_STR_CNT         (USBD3_CUSTOM_CLASS0_STR_CNT)
#if    (USBD_CUSTOM_CLASS0_IF0_EN == 1)
#if   ((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF1_EN == 1)
#if   ((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF2_EN == 1)
#if   ((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF3_EN == 1)
#if   ((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF0_EN == 1)
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[0][1]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[0][2]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[0][3]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[0][4]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[0][5]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[0][6]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[0][7]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[0][8]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[0][9]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[0][10]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[0][11]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[0][12]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[0][13]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[0][14]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[0][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF1_EN == 1)
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[0][1]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[0][2]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[0][3]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[0][4]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[0][5]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[0][6]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[0][7]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[0][8]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[0][9]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[0][10]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[0][11]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[0][12]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[0][13]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[0][14]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[0][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF2_EN == 1)
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[0][1]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[0][2]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[0][3]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[0][4]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[0][5]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[0][6]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[0][7]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[0][8]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[0][9]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[0][10]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[0][11]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[0][12]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[0][13]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[0][14]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[0][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS0_IF3_EN == 1)
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[0][1]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[0][2]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[0][3]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[0][4]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[0][5]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[0][6]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[0][7]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[0][8]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[0][9]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[0][10]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[0][11]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[0][12]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[0][13]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[0][14]
#endif
#if  (((USBD_CUSTOM_CLASS0_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS0_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS0_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[0][15]
#endif
#endif
#else
#define USBD3_CUSTOM_CLASS0                 0
#define USBD3_CUSTOM_CLASS0_IAD_EN          0
#define USBD3_CUSTOM_CLASS0_IF_CNT          0
#define USBD3_CUSTOM_CLASS0_EP_CNT          0
#define USBD3_CUSTOM_CLASS0_IF_DESC_CNT     0
#define USBD3_CUSTOM_CLASS0_STR_CNT         0
#define USBD3_CUSTOM_CLASS0_MS_COMPAT_CNT   0
#define USBD3_CUSTOM_CLASS0_MS_PROP_CNT     0
#endif

#if    (defined(RTE_USB_Device_CustomClass_1) && (USBD_CUSTOM_CLASS1_DEV == 3))              // USB Device 3 Custom Class 1
#define USBD3_CUSTOM_CLASS1                 1
#define USBD3_CUSTOM_CLASS1_IAD_EN         (USBD_CUSTOM_CLASS1_IAD_EN)
#define USBD3_CUSTOM_CLASS1_IF_CNT        ((USBD_CUSTOM_CLASS1_IF0_EN*(USBD_CUSTOM_CLASS1_IF0_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS1_IF1_EN*(USBD_CUSTOM_CLASS1_IF1_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS1_IF2_EN*(USBD_CUSTOM_CLASS1_IF2_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS1_IF3_EN*(USBD_CUSTOM_CLASS1_IF3_ALT == 0)))
#define USBD3_CUSTOM_CLASS1_IF0_EP_CNT    ((USBD_CUSTOM_CLASS1_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF0_EP0_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP1_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP2_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP3_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP4_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP5_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP6_EN + \
                                            USBD_CUSTOM_CLASS1_IF0_EP7_EN))
#define USBD3_CUSTOM_CLASS1_IF0_EP_MSK    ((USBD_CUSTOM_CLASS1_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF0_EP0_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP1_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP2_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP3_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP4_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP5_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP6_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF0_EP7_EN * (1 << (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS1_IF1_EP_CNT    ((USBD_CUSTOM_CLASS1_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF1_EP0_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP1_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP2_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP3_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP4_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP5_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP6_EN + \
                                            USBD_CUSTOM_CLASS1_IF1_EP7_EN))
#define USBD3_CUSTOM_CLASS1_IF1_EP_MSK    ((USBD_CUSTOM_CLASS1_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF1_EP0_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP1_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP2_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP3_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP4_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP5_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP6_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF1_EP7_EN * (1 << (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS1_IF2_EP_CNT    ((USBD_CUSTOM_CLASS1_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF2_EP0_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP1_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP2_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP3_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP4_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP5_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP6_EN + \
                                            USBD_CUSTOM_CLASS1_IF2_EP7_EN))
#define USBD3_CUSTOM_CLASS1_IF2_EP_MSK    ((USBD_CUSTOM_CLASS1_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF2_EP0_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP1_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP2_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP3_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP4_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP5_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP6_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF2_EP7_EN * (1 << (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS1_IF3_EP_CNT    ((USBD_CUSTOM_CLASS1_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF3_EP0_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP1_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP2_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP3_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP4_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP5_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP6_EN + \
                                            USBD_CUSTOM_CLASS1_IF3_EP7_EN))
#define USBD3_CUSTOM_CLASS1_IF3_EP_MSK    ((USBD_CUSTOM_CLASS1_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS1_IF3_EP0_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP1_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP2_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP3_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP4_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP5_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP6_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS1_IF3_EP7_EN * (1 << (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS1_EP_CNT         (USBD3_CUSTOM_CLASS1_IF0_EP_CNT+USBD3_CUSTOM_CLASS1_IF1_EP_CNT+USBD3_CUSTOM_CLASS1_IF2_EP_CNT+USBD3_CUSTOM_CLASS1_IF3_EP_CNT)
#define USBD3_CUSTOM_CLASS1_EP_MSK         (USBD3_CUSTOM_CLASS1_IF0_EP_MSK|USBD3_CUSTOM_CLASS1_IF1_EP_MSK|USBD3_CUSTOM_CLASS1_IF2_EP_MSK|USBD3_CUSTOM_CLASS1_IF3_EP_MSK)
#define USBD3_CUSTOM_CLASS1_IF_DESC_CNT    (USBD_CUSTOM_CLASS1_IF0_EN+USBD_CUSTOM_CLASS1_IF1_EN+USBD_CUSTOM_CLASS1_IF2_EN+USBD_CUSTOM_CLASS1_IF3_EN)
#define USBD3_CUSTOM_CLASS1_STR_CNT        (USBD_CUSTOM_CLASS1_IF0_EN*USBD_CUSTOM_CLASS1_IF0_STR_EN+USBD_CUSTOM_CLASS1_IF1_EN*USBD_CUSTOM_CLASS1_IF1_STR_EN+USBD_CUSTOM_CLASS1_IF2_EN*USBD_CUSTOM_CLASS1_IF2_STR_EN+USBD_CUSTOM_CLASS1_IF3_EN*USBD_CUSTOM_CLASS1_IF3_STR_EN)
#define USBD3_CUSTOM_CLASS1_MS_COMPAT_CNT  (USBD_CUSTOM_CLASS1_IF0_EN*USBD_CUSTOM_CLASS1_IF0_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS1_IF1_EN*USBD_CUSTOM_CLASS1_IF1_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS1_IF2_EN*USBD_CUSTOM_CLASS1_IF2_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS1_IF3_EN*USBD_CUSTOM_CLASS1_IF3_OS_EXT_COMPAT_ID_EN)
#define USBD_CUSTOM_CLASS1_HS              (USBD3_HS)
#define USBD_CUSTOM_CLASS1_IF_CNT          (USBD3_CUSTOM_CLASS1_IF_CNT)
#define USBD_CUSTOM_CLASS1_IF0_EP_CNT      (USBD3_CUSTOM_CLASS1_IF0_EP_CNT)
#define USBD_CUSTOM_CLASS1_IF1_EP_CNT      (USBD3_CUSTOM_CLASS1_IF1_EP_CNT)
#define USBD_CUSTOM_CLASS1_IF2_EP_CNT      (USBD3_CUSTOM_CLASS1_IF2_EP_CNT)
#define USBD_CUSTOM_CLASS1_IF3_EP_CNT      (USBD3_CUSTOM_CLASS1_IF3_EP_CNT)
#define USBD_CUSTOM_CLASS1_EP_CNT          (USBD3_CUSTOM_CLASS1_EP_CNT)
#define USBD_CUSTOM_CLASS1_EP_MSK          (USBD3_CUSTOM_CLASS1_EP_MSK)
#define USBD_CUSTOM_CLASS1_IF_DESC_CNT     (USBD3_CUSTOM_CLASS1_IF_DESC_CNT)
#define USBD_CUSTOM_CLASS1_IF0_STR_IDX     (USBD_CUSTOM_CLASS1_IF0_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT))
#define USBD_CUSTOM_CLASS1_IF1_STR_IDX     (USBD_CUSTOM_CLASS1_IF1_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD_CUSTOM_CLASS1_IF0_EN*USBD_CUSTOM_CLASS1_IF0_STR_EN))
#define USBD_CUSTOM_CLASS1_IF2_STR_IDX     (USBD_CUSTOM_CLASS1_IF2_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD_CUSTOM_CLASS1_IF0_EN*USBD_CUSTOM_CLASS1_IF0_STR_EN+USBD_CUSTOM_CLASS1_IF1_EN*USBD_CUSTOM_CLASS1_IF1_STR_EN))
#define USBD_CUSTOM_CLASS1_IF3_STR_IDX     (USBD_CUSTOM_CLASS1_IF3_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD_CUSTOM_CLASS1_IF0_EN*USBD_CUSTOM_CLASS1_IF0_STR_EN+USBD_CUSTOM_CLASS1_IF1_EN*USBD_CUSTOM_CLASS1_IF1_STR_EN+USBD_CUSTOM_CLASS1_IF2_EN*USBD_CUSTOM_CLASS1_IF2_STR_EN))
#define USBD_CUSTOM_CLASS1_STR_CNT         (USBD3_CUSTOM_CLASS1_STR_CNT)
#if    (USBD_CUSTOM_CLASS1_IF0_EN == 1)
#if   ((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF1_EN == 1)
#if   ((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF2_EN == 1)
#if   ((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF3_EN == 1)
#if   ((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF0_EN == 1)
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[1][1]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[1][2]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[1][3]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[1][4]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[1][5]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[1][6]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[1][7]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[1][8]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[1][9]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[1][10]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[1][11]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[1][12]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[1][13]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[1][14]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[1][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF1_EN == 1)
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[1][1]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[1][2]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[1][3]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[1][4]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[1][5]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[1][6]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[1][7]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[1][8]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[1][9]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[1][10]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[1][11]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[1][12]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[1][13]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[1][14]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[1][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF2_EN == 1)
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[1][1]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[1][2]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[1][3]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[1][4]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[1][5]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[1][6]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[1][7]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[1][8]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[1][9]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[1][10]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[1][11]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[1][12]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[1][13]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[1][14]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[1][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS1_IF3_EN == 1)
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[1][1]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[1][2]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[1][3]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[1][4]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[1][5]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[1][6]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[1][7]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[1][8]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[1][9]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[1][10]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[1][11]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[1][12]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[1][13]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[1][14]
#endif
#if  (((USBD_CUSTOM_CLASS1_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS1_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS1_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[1][15]
#endif
#endif
#else
#define USBD3_CUSTOM_CLASS1                 0
#define USBD3_CUSTOM_CLASS1_IAD_EN          0
#define USBD3_CUSTOM_CLASS1_IF_CNT          0
#define USBD3_CUSTOM_CLASS1_EP_CNT          0
#define USBD3_CUSTOM_CLASS1_IF_DESC_CNT     0
#define USBD3_CUSTOM_CLASS1_STR_CNT         0
#define USBD3_CUSTOM_CLASS1_MS_COMPAT_CNT   0
#define USBD3_CUSTOM_CLASS1_MS_PROP_CNT     0
#endif

#if    (defined(RTE_USB_Device_CustomClass_2) && (USBD_CUSTOM_CLASS2_DEV == 3))              // USB Device 3 Custom Class 2
#define USBD3_CUSTOM_CLASS2                 1
#define USBD3_CUSTOM_CLASS2_IAD_EN         (USBD_CUSTOM_CLASS2_IAD_EN)
#define USBD3_CUSTOM_CLASS2_IF_CNT        ((USBD_CUSTOM_CLASS2_IF0_EN*(USBD_CUSTOM_CLASS2_IF0_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS2_IF1_EN*(USBD_CUSTOM_CLASS2_IF1_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS2_IF2_EN*(USBD_CUSTOM_CLASS2_IF2_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS2_IF3_EN*(USBD_CUSTOM_CLASS2_IF3_ALT == 0)))
#define USBD3_CUSTOM_CLASS2_IF0_EP_CNT    ((USBD_CUSTOM_CLASS2_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF0_EP0_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP1_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP2_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP3_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP4_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP5_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP6_EN + \
                                            USBD_CUSTOM_CLASS2_IF0_EP7_EN))
#define USBD3_CUSTOM_CLASS2_IF0_EP_MSK    ((USBD_CUSTOM_CLASS2_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF0_EP0_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP1_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP2_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP3_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP4_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP5_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP6_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF0_EP7_EN * (1 << (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS2_IF1_EP_CNT    ((USBD_CUSTOM_CLASS2_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF1_EP0_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP1_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP2_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP3_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP4_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP5_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP6_EN + \
                                            USBD_CUSTOM_CLASS2_IF1_EP7_EN))
#define USBD3_CUSTOM_CLASS2_IF1_EP_MSK    ((USBD_CUSTOM_CLASS2_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF1_EP0_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP1_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP2_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP3_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP4_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP5_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP6_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF1_EP7_EN * (1 << (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS2_IF2_EP_CNT    ((USBD_CUSTOM_CLASS2_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF2_EP0_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP1_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP2_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP3_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP4_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP5_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP6_EN + \
                                            USBD_CUSTOM_CLASS2_IF2_EP7_EN))
#define USBD3_CUSTOM_CLASS2_IF2_EP_MSK    ((USBD_CUSTOM_CLASS2_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF2_EP0_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP1_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP2_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP3_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP4_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP5_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP6_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF2_EP7_EN * (1 << (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS2_IF3_EP_CNT    ((USBD_CUSTOM_CLASS2_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF3_EP0_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP1_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP2_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP3_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP4_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP5_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP6_EN + \
                                            USBD_CUSTOM_CLASS2_IF3_EP7_EN))
#define USBD3_CUSTOM_CLASS2_IF3_EP_MSK    ((USBD_CUSTOM_CLASS2_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS2_IF3_EP0_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP1_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP2_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP3_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP4_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP5_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP6_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS2_IF3_EP7_EN * (1 << (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS2_EP_CNT         (USBD3_CUSTOM_CLASS2_IF0_EP_CNT+USBD3_CUSTOM_CLASS2_IF1_EP_CNT+USBD3_CUSTOM_CLASS2_IF2_EP_CNT+USBD3_CUSTOM_CLASS2_IF3_EP_CNT)
#define USBD3_CUSTOM_CLASS2_EP_MSK         (USBD3_CUSTOM_CLASS2_IF0_EP_MSK|USBD3_CUSTOM_CLASS2_IF1_EP_MSK|USBD3_CUSTOM_CLASS2_IF2_EP_MSK|USBD3_CUSTOM_CLASS2_IF3_EP_MSK)
#define USBD3_CUSTOM_CLASS2_IF_DESC_CNT    (USBD_CUSTOM_CLASS2_IF0_EN+USBD_CUSTOM_CLASS2_IF1_EN+USBD_CUSTOM_CLASS2_IF2_EN+USBD_CUSTOM_CLASS2_IF3_EN)
#define USBD3_CUSTOM_CLASS2_STR_CNT        (USBD_CUSTOM_CLASS2_IF0_EN*USBD_CUSTOM_CLASS2_IF0_STR_EN+USBD_CUSTOM_CLASS2_IF1_EN*USBD_CUSTOM_CLASS2_IF1_STR_EN+USBD_CUSTOM_CLASS2_IF2_EN*USBD_CUSTOM_CLASS2_IF2_STR_EN+USBD_CUSTOM_CLASS2_IF3_EN*USBD_CUSTOM_CLASS2_IF3_STR_EN)
#define USBD3_CUSTOM_CLASS2_MS_COMPAT_CNT  (USBD_CUSTOM_CLASS2_IF0_EN*USBD_CUSTOM_CLASS2_IF0_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS2_IF1_EN*USBD_CUSTOM_CLASS2_IF1_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS2_IF2_EN*USBD_CUSTOM_CLASS2_IF2_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS2_IF3_EN*USBD_CUSTOM_CLASS2_IF3_OS_EXT_COMPAT_ID_EN)
#define USBD_CUSTOM_CLASS2_HS              (USBD3_HS)
#define USBD_CUSTOM_CLASS2_IF_CNT          (USBD3_CUSTOM_CLASS2_IF_CNT)
#define USBD_CUSTOM_CLASS2_IF0_EP_CNT      (USBD3_CUSTOM_CLASS2_IF0_EP_CNT)
#define USBD_CUSTOM_CLASS2_IF1_EP_CNT      (USBD3_CUSTOM_CLASS2_IF1_EP_CNT)
#define USBD_CUSTOM_CLASS2_IF2_EP_CNT      (USBD3_CUSTOM_CLASS2_IF2_EP_CNT)
#define USBD_CUSTOM_CLASS2_IF3_EP_CNT      (USBD3_CUSTOM_CLASS2_IF3_EP_CNT)
#define USBD_CUSTOM_CLASS2_EP_CNT          (USBD3_CUSTOM_CLASS2_EP_CNT)
#define USBD_CUSTOM_CLASS2_EP_MSK          (USBD3_CUSTOM_CLASS2_EP_MSK)
#define USBD_CUSTOM_CLASS2_IF_DESC_CNT     (USBD3_CUSTOM_CLASS2_IF_DESC_CNT)
#define USBD_CUSTOM_CLASS2_IF0_STR_IDX     (USBD_CUSTOM_CLASS2_IF0_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT))
#define USBD_CUSTOM_CLASS2_IF1_STR_IDX     (USBD_CUSTOM_CLASS2_IF1_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD_CUSTOM_CLASS2_IF0_EN*USBD_CUSTOM_CLASS2_IF0_STR_EN))
#define USBD_CUSTOM_CLASS2_IF2_STR_IDX     (USBD_CUSTOM_CLASS2_IF2_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD_CUSTOM_CLASS2_IF0_EN*USBD_CUSTOM_CLASS2_IF0_STR_EN+USBD_CUSTOM_CLASS2_IF1_EN*USBD_CUSTOM_CLASS2_IF1_STR_EN))
#define USBD_CUSTOM_CLASS2_IF3_STR_IDX     (USBD_CUSTOM_CLASS2_IF3_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD_CUSTOM_CLASS2_IF0_EN*USBD_CUSTOM_CLASS2_IF0_STR_EN+USBD_CUSTOM_CLASS2_IF1_EN*USBD_CUSTOM_CLASS2_IF1_STR_EN+USBD_CUSTOM_CLASS2_IF2_EN*USBD_CUSTOM_CLASS2_IF2_STR_EN))
#define USBD_CUSTOM_CLASS2_STR_CNT         (USBD3_CUSTOM_CLASS2_STR_CNT)
#if    (USBD_CUSTOM_CLASS2_IF0_EN == 1)
#if   ((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF1_EN == 1)
#if   ((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF2_EN == 1)
#if   ((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF3_EN == 1)
#if   ((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF0_EN == 1)
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[2][1]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[2][2]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[2][3]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[2][4]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[2][5]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[2][6]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[2][7]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[2][8]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[2][9]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[2][10]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[2][11]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[2][12]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[2][13]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[2][14]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[2][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF1_EN == 1)
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[2][1]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[2][2]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[2][3]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[2][4]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[2][5]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[2][6]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[2][7]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[2][8]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[2][9]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[2][10]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[2][11]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[2][12]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[2][13]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[2][14]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[2][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF2_EN == 1)
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[2][1]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[2][2]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[2][3]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[2][4]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[2][5]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[2][6]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[2][7]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[2][8]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[2][9]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[2][10]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[2][11]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[2][12]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[2][13]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[2][14]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[2][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS2_IF3_EN == 1)
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[2][1]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[2][2]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[2][3]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[2][4]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[2][5]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[2][6]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[2][7]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[2][8]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[2][9]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[2][10]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[2][11]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[2][12]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[2][13]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[2][14]
#endif
#if  (((USBD_CUSTOM_CLASS2_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS2_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS2_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[2][15]
#endif
#endif
#else
#define USBD3_CUSTOM_CLASS2                 0
#define USBD3_CUSTOM_CLASS2_IAD_EN          0
#define USBD3_CUSTOM_CLASS2_IF_CNT          0
#define USBD3_CUSTOM_CLASS2_EP_CNT          0
#define USBD3_CUSTOM_CLASS2_IF_DESC_CNT     0
#define USBD3_CUSTOM_CLASS2_STR_CNT         0
#define USBD3_CUSTOM_CLASS2_MS_COMPAT_CNT   0
#define USBD3_CUSTOM_CLASS2_MS_PROP_CNT     0
#endif

#if    (defined(RTE_USB_Device_CustomClass_3) && (USBD_CUSTOM_CLASS3_DEV == 3))              // USB Device 3 Custom Class 3
#define USBD3_CUSTOM_CLASS3                 1
#define USBD3_CUSTOM_CLASS3_IAD_EN         (USBD_CUSTOM_CLASS3_IAD_EN)
#define USBD3_CUSTOM_CLASS3_IF_CNT        ((USBD_CUSTOM_CLASS3_IF0_EN*(USBD_CUSTOM_CLASS3_IF0_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS3_IF1_EN*(USBD_CUSTOM_CLASS3_IF1_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS3_IF2_EN*(USBD_CUSTOM_CLASS3_IF2_ALT == 0))+\
                                           (USBD_CUSTOM_CLASS3_IF3_EN*(USBD_CUSTOM_CLASS3_IF3_ALT == 0)))
#define USBD3_CUSTOM_CLASS3_IF0_EP_CNT    ((USBD_CUSTOM_CLASS3_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF0_EP0_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP1_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP2_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP3_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP4_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP5_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP6_EN + \
                                            USBD_CUSTOM_CLASS3_IF0_EP7_EN))
#define USBD3_CUSTOM_CLASS3_IF0_EP_MSK    ((USBD_CUSTOM_CLASS3_IF0_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF0_EP0_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP1_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP2_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP3_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP4_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP5_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP6_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF0_EP7_EN * (1 << (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS3_IF1_EP_CNT    ((USBD_CUSTOM_CLASS3_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF1_EP0_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP1_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP2_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP3_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP4_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP5_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP6_EN + \
                                            USBD_CUSTOM_CLASS3_IF1_EP7_EN))
#define USBD3_CUSTOM_CLASS3_IF1_EP_MSK    ((USBD_CUSTOM_CLASS3_IF1_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF1_EP0_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP1_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP2_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP3_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP4_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP5_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP6_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF1_EP7_EN * (1 << (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS3_IF2_EP_CNT    ((USBD_CUSTOM_CLASS3_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF2_EP0_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP1_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP2_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP3_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP4_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP5_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP6_EN + \
                                            USBD_CUSTOM_CLASS3_IF2_EP7_EN))
#define USBD3_CUSTOM_CLASS3_IF2_EP_MSK    ((USBD_CUSTOM_CLASS3_IF2_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF2_EP0_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP1_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP2_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP3_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP4_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP5_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP6_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF2_EP7_EN * (1 << (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS3_IF3_EP_CNT    ((USBD_CUSTOM_CLASS3_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF3_EP0_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP1_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP2_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP3_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP4_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP5_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP6_EN + \
                                            USBD_CUSTOM_CLASS3_IF3_EP7_EN))
#define USBD3_CUSTOM_CLASS3_IF3_EP_MSK    ((USBD_CUSTOM_CLASS3_IF3_EN)    * \
                                           (USBD_CUSTOM_CLASS3_IF3_EP0_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP1_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP2_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP3_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP4_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP5_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP6_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) | \
                                            USBD_CUSTOM_CLASS3_IF3_EP7_EN * (1 << (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F))))
#define USBD3_CUSTOM_CLASS3_EP_CNT         (USBD3_CUSTOM_CLASS3_IF0_EP_CNT+USBD3_CUSTOM_CLASS3_IF1_EP_CNT+USBD3_CUSTOM_CLASS3_IF2_EP_CNT+USBD3_CUSTOM_CLASS3_IF3_EP_CNT)
#define USBD3_CUSTOM_CLASS3_EP_MSK         (USBD3_CUSTOM_CLASS3_IF0_EP_MSK|USBD3_CUSTOM_CLASS3_IF1_EP_MSK|USBD3_CUSTOM_CLASS3_IF2_EP_MSK|USBD3_CUSTOM_CLASS3_IF3_EP_MSK)
#define USBD3_CUSTOM_CLASS3_IF_DESC_CNT    (USBD_CUSTOM_CLASS3_IF0_EN+USBD_CUSTOM_CLASS3_IF1_EN+USBD_CUSTOM_CLASS3_IF2_EN+USBD_CUSTOM_CLASS3_IF3_EN)
#define USBD3_CUSTOM_CLASS3_STR_CNT        (USBD_CUSTOM_CLASS3_IF0_EN*USBD_CUSTOM_CLASS3_IF0_STR_EN+USBD_CUSTOM_CLASS3_IF1_EN*USBD_CUSTOM_CLASS3_IF1_STR_EN+USBD_CUSTOM_CLASS3_IF2_EN*USBD_CUSTOM_CLASS3_IF2_STR_EN+USBD_CUSTOM_CLASS3_IF3_EN*USBD_CUSTOM_CLASS3_IF3_STR_EN)
#define USBD3_CUSTOM_CLASS3_MS_COMPAT_CNT  (USBD_CUSTOM_CLASS3_IF0_EN*USBD_CUSTOM_CLASS3_IF0_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS3_IF1_EN*USBD_CUSTOM_CLASS3_IF1_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS3_IF2_EN*USBD_CUSTOM_CLASS3_IF2_OS_EXT_COMPAT_ID_EN+\
                                            USBD_CUSTOM_CLASS3_IF3_EN*USBD_CUSTOM_CLASS3_IF3_OS_EXT_COMPAT_ID_EN)
#define USBD_CUSTOM_CLASS3_HS              (USBD3_HS)
#define USBD_CUSTOM_CLASS3_IF_CNT          (USBD3_CUSTOM_CLASS3_IF_CNT)
#define USBD_CUSTOM_CLASS3_IF0_EP_CNT      (USBD3_CUSTOM_CLASS3_IF0_EP_CNT)
#define USBD_CUSTOM_CLASS3_IF1_EP_CNT      (USBD3_CUSTOM_CLASS3_IF1_EP_CNT)
#define USBD_CUSTOM_CLASS3_IF2_EP_CNT      (USBD3_CUSTOM_CLASS3_IF2_EP_CNT)
#define USBD_CUSTOM_CLASS3_IF3_EP_CNT      (USBD3_CUSTOM_CLASS3_IF3_EP_CNT)
#define USBD_CUSTOM_CLASS3_EP_CNT          (USBD3_CUSTOM_CLASS3_EP_CNT)
#define USBD_CUSTOM_CLASS3_EP_MSK          (USBD3_CUSTOM_CLASS3_EP_MSK)
#define USBD_CUSTOM_CLASS3_IF_DESC_CNT     (USBD3_CUSTOM_CLASS3_IF_DESC_CNT)
#define USBD_CUSTOM_CLASS3_IF0_STR_IDX     (USBD_CUSTOM_CLASS3_IF0_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD3_CUSTOM_CLASS2_STR_CNT))
#define USBD_CUSTOM_CLASS3_IF1_STR_IDX     (USBD_CUSTOM_CLASS3_IF1_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD3_CUSTOM_CLASS2_STR_CNT+USBD_CUSTOM_CLASS3_IF0_EN*USBD_CUSTOM_CLASS3_IF0_STR_EN))
#define USBD_CUSTOM_CLASS3_IF2_STR_IDX     (USBD_CUSTOM_CLASS3_IF2_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD3_CUSTOM_CLASS2_STR_CNT+USBD_CUSTOM_CLASS3_IF0_EN*USBD_CUSTOM_CLASS3_IF0_STR_EN+USBD_CUSTOM_CLASS3_IF1_EN*USBD_CUSTOM_CLASS3_IF1_STR_EN))
#define USBD_CUSTOM_CLASS3_IF3_STR_IDX     (USBD_CUSTOM_CLASS3_IF3_STR_EN * (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD3_CUSTOM_CLASS2_STR_CNT+USBD_CUSTOM_CLASS3_IF0_EN*USBD_CUSTOM_CLASS3_IF0_STR_EN+USBD_CUSTOM_CLASS3_IF1_EN*USBD_CUSTOM_CLASS3_IF1_STR_EN+USBD_CUSTOM_CLASS3_IF2_EN*USBD_CUSTOM_CLASS3_IF2_STR_EN))
#define USBD_CUSTOM_CLASS3_STR_CNT         (USBD3_CUSTOM_CLASS3_STR_CNT)
#if    (USBD_CUSTOM_CLASS3_IF0_EN == 1)
#if   ((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF1_EN == 1)
#if   ((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF2_EN == 1)
#if   ((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF3_EN == 1)
#if   ((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)
#endif
#if   ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF0_EN == 1)
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[3][1]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[3][2]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[3][3]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[3][4]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[3][5]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[3][6]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[3][7]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[3][8]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[3][9]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[3][10]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[3][11]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[3][12]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[3][13]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[3][14]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF0_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF0_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF0_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[3][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF1_EN == 1)
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[3][1]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[3][2]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[3][3]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[3][4]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[3][5]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[3][6]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[3][7]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[3][8]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[3][9]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[3][10]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[3][11]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[3][12]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[3][13]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[3][14]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF1_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF1_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF1_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[3][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF2_EN == 1)
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[3][1]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[3][2]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[3][3]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[3][4]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[3][5]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[3][6]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[3][7]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[3][8]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[3][9]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[3][10]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[3][11]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[3][12]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[3][13]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[3][14]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF2_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF2_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF2_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[3][15]
#endif
#endif
#if    (USBD_CUSTOM_CLASS3_IF3_EN == 1)
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  1) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_custom_class_ep_thread_id[3][1]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  2) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_custom_class_ep_thread_id[3][2]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  3) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_custom_class_ep_thread_id[3][3]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  4) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_custom_class_ep_thread_id[3][4]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  5) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_custom_class_ep_thread_id[3][5]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  6) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_custom_class_ep_thread_id[3][6]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  7) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_custom_class_ep_thread_id[3][7]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  8) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_custom_class_ep_thread_id[3][8]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) ==  9) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_custom_class_ep_thread_id[3][9]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 10) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_custom_class_ep_thread_id[3][10]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 11) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_custom_class_ep_thread_id[3][11]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 12) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_custom_class_ep_thread_id[3][12]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 13) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_custom_class_ep_thread_id[3][13]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 14) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_custom_class_ep_thread_id[3][14]
#endif
#if  (((USBD_CUSTOM_CLASS3_IF3_EP0_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP0_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP1_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP1_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP2_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP2_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP3_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP3_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP4_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP4_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP5_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP5_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP6_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP6_BENDPOINTADDRESS & 0x0F)) == 15) || \
      ((USBD_CUSTOM_CLASS3_IF3_EP7_EN  *   (USBD_CUSTOM_CLASS3_IF3_EP7_BENDPOINTADDRESS & 0x0F)) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_custom_class_ep_thread_id[3][15]
#endif
#endif
#else
#define USBD3_CUSTOM_CLASS3                 0
#define USBD3_CUSTOM_CLASS3_IAD_EN          0
#define USBD3_CUSTOM_CLASS3_IF_CNT          0
#define USBD3_CUSTOM_CLASS3_EP_CNT          0
#define USBD3_CUSTOM_CLASS3_IF_DESC_CNT     0
#define USBD3_CUSTOM_CLASS3_STR_CNT         0
#define USBD3_CUSTOM_CLASS3_MS_CNT          0
#define USBD3_CUSTOM_CLASS3_MS_COMPAT_CNT   0
#define USBD3_CUSTOM_CLASS3_MS_PROP_CNT     0
#endif

#define USBD3_CUSTOM_CLASS_CNT             (USBD3_CUSTOM_CLASS0+USBD3_CUSTOM_CLASS1+USBD3_CUSTOM_CLASS2+USBD3_CUSTOM_CLASS3)
#define USBD3_CUSTOM_CLASS_IF_CNT          (USBD3_CUSTOM_CLASS0_IF_CNT+USBD3_CUSTOM_CLASS1_IF_CNT+USBD3_CUSTOM_CLASS2_IF_CNT+USBD3_CUSTOM_CLASS3_IF_CNT)
#define USBD3_CUSTOM_CLASS_EP_CNT          (USBD3_CUSTOM_CLASS0_EP_CNT+USBD3_CUSTOM_CLASS1_EP_CNT+USBD3_CUSTOM_CLASS2_EP_CNT+USBD3_CUSTOM_CLASS3_EP_CNT)
#define USBD3_CUSTOM_CLASS_IF_DESC_CNT     (USBD3_CUSTOM_CLASS0_IF_DESC_CNT+USBD3_CUSTOM_CLASS1_IF_DESC_CNT+USBD3_CUSTOM_CLASS2_IF_DESC_CNT+USBD3_CUSTOM_CLASS3_IF_DESC_CNT)
#define USBD3_CUSTOM_CLASS_STR_CNT         (USBD3_CUSTOM_CLASS0_STR_CNT+USBD3_CUSTOM_CLASS1_STR_CNT+USBD3_CUSTOM_CLASS2_STR_CNT+USBD3_CUSTOM_CLASS3_STR_CNT)
#define USBD3_CUSTOM_CLASS_MS_COMPAT_CNT   (USBD3_CUSTOM_CLASS0_MS_COMPAT_CNT+USBD3_CUSTOM_CLASS1_MS_COMPAT_CNT+USBD3_CUSTOM_CLASS2_MS_COMPAT_CNT+USBD3_CUSTOM_CLASS3_MS_COMPAT_CNT)
#define USBD3_CUSTOM_CLASS_MS_PROP_CNT     (USBD3_CUSTOM_CLASS0_MS_PROP_CNT+USBD3_CUSTOM_CLASS1_MS_PROP_CNT+USBD3_CUSTOM_CLASS2_MS_PROP_CNT+USBD3_CUSTOM_CLASS3_MS_PROP_CNT)

#if    (defined(RTE_USB_Device_ADC_0) && (USBD_ADC0_DEV == 3))                  // USB Device 3 Audio Class 0
#define USBD3_ADC0                          1
#define USBD3_ADC0_IF_SPKR                 (USBD_ADC0_EP_ISO_OUT_EN == 1)
#define USBD3_ADC0_IF_MIC                  (USBD_ADC0_EP_ISO_IN_EN  == 1)
#define USBD3_ADC0_IF_CNT                  (1+USBD3_ADC0_IF_SPKR+USBD3_ADC0_IF_MIC)
#define USBD3_ADC0_EP_CNT                  (USBD_ADC0_EP_ISO_OUT_EN+USBD_ADC0_EP_ISO_IN_EN)
#define USBD3_ADC0_STR_CNT                 (1+USBD3_ADC0_IF_SPKR*2+USBD3_ADC0_IF_MIC*2)
#define USBD3_ADC0_OUT_CH_NUM              (USBD_ADC0_OUT_CH_NUM)
#define USBD3_ADC0_IN_CH_NUM               (USBD_ADC0_IN_CH_NUM)
#define USBD_ADC0_HS                       (USBD3_HS)
#define USBD_ADC0_IF_SPKR                  (USBD3_ADC0_IF_SPKR)
#define USBD_ADC0_IF_MIC                   (USBD3_ADC0_IF_MIC)
#define USBD_ADC0_IF_CTRL_NUM              (USBD3_CUSTOM_CLASS_IF_CNT)
#define USBD_ADC0_IF_SPKR_NUM              (USBD_ADC0_IF_CTRL_NUM+USBD3_ADC0_IF_SPKR)
#define USBD_ADC0_IF_MIC_NUM               (USBD_ADC0_IF_SPKR_NUM+USBD3_ADC0_IF_MIC)
#define USBD_ADC0_IF_CNT                   (USBD3_ADC0_IF_CNT)
#define USBD_ADC0_EP_CNT                   (USBD3_ADC0_EP_CNT)
#define USBD_ADC0_IF_CTRL_STR_IDX          (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT)
#define USBD_ADC0_IF_SPKR_ALT0_STR_IDX     (USBD_ADC0_IF_CTRL_STR_IDX+USBD3_ADC0_IF_SPKR)
#define USBD_ADC0_IF_SPKR_ALT1_STR_IDX     (USBD_ADC0_IF_CTRL_STR_IDX+USBD3_ADC0_IF_SPKR*2)
#define USBD_ADC0_IF_MIC_ALT0_STR_IDX      (USBD_ADC0_IF_SPKR_ALT1_STR_IDX+USBD3_ADC0_IF_MIC)
#define USBD_ADC0_IF_MIC_ALT1_STR_IDX      (USBD_ADC0_IF_SPKR_ALT1_STR_IDX+USBD3_ADC0_IF_MIC*2)
#define USBD_ADC0_STR_CNT                  (USBD3_ADC0_STR_CNT)
#if    ((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC0_EP_ISO_OUT)
#endif
#if    ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC0_EP_ISO_IN)
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  1) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  2) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  3) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  4) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  5) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  6) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  7) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  8) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) ==  9) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) == 10) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) == 11) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) == 12) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) == 13) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) == 14) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC0_EP_ISO_OUT_EN * USBD_ADC0_EP_ISO_OUT) == 15) || ((USBD_ADC0_EP_ISO_IN_EN * USBD_ADC0_EP_ISO_IN) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_adc_thread_id[0]
#endif
#else
#define USBD3_ADC0                          0
#define USBD3_ADC0_IF_SPKR                  0
#define USBD3_ADC0_IF_MIC                   0
#define USBD3_ADC0_IF_CNT                   0
#define USBD3_ADC0_EP_CNT                   0
#define USBD3_ADC0_STR_CNT                  0
#define USBD3_ADC0_OUT_CH_NUM               0
#define USBD3_ADC0_IN_CH_NUM                0
#endif

#if    (defined(RTE_USB_Device_ADC_1) && (USBD_ADC1_DEV == 3))                  // USB Device 3 Audio Class 1
#define USBD3_ADC1                          1
#define USBD3_ADC1_IF_SPKR                 (USBD_ADC1_EP_ISO_OUT_EN == 1)
#define USBD3_ADC1_IF_MIC                  (USBD_ADC1_EP_ISO_IN_EN  == 1)
#define USBD3_ADC1_IF_CNT                  (1+USBD3_ADC1_IF_SPKR+USBD3_ADC1_IF_MIC)
#define USBD3_ADC1_EP_CNT                  (USBD_ADC1_EP_ISO_OUT_EN+USBD_ADC1_EP_ISO_IN_EN)
#define USBD3_ADC1_STR_CNT                 (1+USBD3_ADC1_IF_SPKR*2+USBD3_ADC1_IF_MIC*2)
#define USBD3_ADC1_OUT_CH_NUM              (USBD_ADC1_OUT_CH_NUM)
#define USBD3_ADC1_IN_CH_NUM               (USBD_ADC1_IN_CH_NUM)
#define USBD_ADC1_HS                       (USBD3_HS)
#define USBD_ADC1_IF_SPKR                  (USBD3_ADC1_IF_SPKR)
#define USBD_ADC1_IF_MIC                   (USBD3_ADC1_IF_MIC)
#define USBD_ADC1_IF_CTRL_NUM              (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC0_IF_CNT)
#define USBD_ADC1_IF_SPKR_NUM              (USBD_ADC1_IF_CTRL_NUM+USBD3_ADC1_IF_SPKR)
#define USBD_ADC1_IF_MIC_NUM               (USBD_ADC1_IF_SPKR_NUM+USBD3_ADC1_IF_MIC)
#define USBD_ADC1_IF_CNT                   (USBD3_ADC1_IF_CNT)
#define USBD_ADC1_EP_CNT                   (USBD3_ADC1_EP_CNT)
#define USBD_ADC1_IF_CTRL_STR_IDX          (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC0_STR_CNT)
#define USBD_ADC1_IF_SPKR_ALT0_STR_IDX     (USBD_ADC1_IF_CTRL_STR_IDX+USBD3_ADC1_IF_SPKR)
#define USBD_ADC1_IF_SPKR_ALT1_STR_IDX     (USBD_ADC1_IF_CTRL_STR_IDX+USBD3_ADC1_IF_SPKR*2)
#define USBD_ADC1_IF_MIC_ALT0_STR_IDX      (USBD_ADC1_IF_SPKR_ALT1_STR_IDX+USBD3_ADC1_IF_MIC)
#define USBD_ADC1_IF_MIC_ALT1_STR_IDX      (USBD_ADC1_IF_SPKR_ALT1_STR_IDX+USBD3_ADC1_IF_MIC*2)
#define USBD_ADC1_STR_CNT                  (USBD3_ADC1_STR_CNT)
#if    ((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC1_EP_ISO_OUT)
#endif
#if    ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC1_EP_ISO_IN)
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  1) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  2) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  3) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  4) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  5) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  6) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  7) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  8) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) ==  9) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) == 10) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) == 11) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) == 12) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) == 13) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) == 14) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC1_EP_ISO_OUT_EN * USBD_ADC1_EP_ISO_OUT) == 15) || ((USBD_ADC1_EP_ISO_IN_EN * USBD_ADC1_EP_ISO_IN) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_adc_thread_id[0]
#endif
#else
#define USBD3_ADC1                          0
#define USBD3_ADC1_IF_SPKR                  0
#define USBD3_ADC1_IF_MIC                   0
#define USBD3_ADC1_IF_CNT                   0
#define USBD3_ADC1_EP_CNT                   0
#define USBD3_ADC1_STR_CNT                  0
#define USBD3_ADC1_OUT_CH_NUM               0
#define USBD3_ADC1_IN_CH_NUM                0
#endif

#if    (defined(RTE_USB_Device_ADC_2) && (USBD_ADC2_DEV == 3))                  // USB Device 3 Audio Class 2
#define USBD3_ADC2                          1
#define USBD3_ADC2_IF_SPKR                 (USBD_ADC2_EP_ISO_OUT_EN == 1)
#define USBD3_ADC2_IF_MIC                  (USBD_ADC2_EP_ISO_IN_EN  == 1)
#define USBD3_ADC2_IF_CNT                  (1+USBD3_ADC2_IF_SPKR+USBD3_ADC2_IF_MIC)
#define USBD3_ADC2_EP_CNT                  (USBD_ADC2_EP_ISO_OUT_EN+USBD_ADC2_EP_ISO_IN_EN)
#define USBD3_ADC2_STR_CNT                 (1+USBD3_ADC2_IF_SPKR*2+USBD3_ADC2_IF_MIC*2)
#define USBD3_ADC2_OUT_CH_NUM              (USBD_ADC2_OUT_CH_NUM)
#define USBD3_ADC2_IN_CH_NUM               (USBD_ADC2_IN_CH_NUM)
#define USBD_ADC2_HS                       (USBD3_HS)
#define USBD_ADC2_IF_SPKR                  (USBD3_ADC2_IF_SPKR)
#define USBD_ADC2_IF_MIC                   (USBD3_ADC2_IF_MIC)
#define USBD_ADC2_IF_CTRL_NUM              (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC0_IF_CNT+USBD3_ADC1_IF_CNT)
#define USBD_ADC2_IF_SPKR_NUM              (USBD_ADC2_IF_CTRL_NUM+USBD3_ADC2_IF_SPKR)
#define USBD_ADC2_IF_MIC_NUM               (USBD_ADC2_IF_SPKR_NUM+USBD3_ADC2_IF_MIC)
#define USBD_ADC2_IF_CNT                   (USBD3_ADC2_IF_CNT)
#define USBD_ADC2_EP_CNT                   (USBD3_ADC2_EP_CNT)
#define USBD_ADC2_IF_CTRL_STR_IDX          (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC0_STR_CNT+USBD3_ADC1_STR_CNT)
#define USBD_ADC2_IF_SPKR_ALT0_STR_IDX     (USBD_ADC2_IF_CTRL_STR_IDX+USBD3_ADC2_IF_SPKR)
#define USBD_ADC2_IF_SPKR_ALT1_STR_IDX     (USBD_ADC2_IF_CTRL_STR_IDX+USBD3_ADC2_IF_SPKR*2)
#define USBD_ADC2_IF_MIC_ALT0_STR_IDX      (USBD_ADC2_IF_SPKR_ALT1_STR_IDX+USBD3_ADC2_IF_MIC)
#define USBD_ADC2_IF_MIC_ALT1_STR_IDX      (USBD_ADC2_IF_SPKR_ALT1_STR_IDX+USBD3_ADC2_IF_MIC*2)
#define USBD_ADC2_STR_CNT                  (USBD3_ADC2_STR_CNT)
#if    ((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC2_EP_ISO_OUT)
#endif
#if    ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC2_EP_ISO_IN)
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  1) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  2) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  3) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  4) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  5) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  6) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  7) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  8) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) ==  9) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) == 10) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) == 11) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) == 12) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) == 13) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) == 14) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC2_EP_ISO_OUT_EN * USBD_ADC2_EP_ISO_OUT) == 15) || ((USBD_ADC2_EP_ISO_IN_EN * USBD_ADC2_EP_ISO_IN) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_adc_thread_id[0]
#endif
#else
#define USBD3_ADC2                          0
#define USBD3_ADC2_IF_SPKR                  0
#define USBD3_ADC2_IF_MIC                   0
#define USBD3_ADC2_IF_CNT                   0
#define USBD3_ADC2_EP_CNT                   0
#define USBD3_ADC2_STR_CNT                  0
#define USBD3_ADC2_OUT_CH_NUM               0
#define USBD3_ADC2_IN_CH_NUM                0
#endif

#if    (defined(RTE_USB_Device_ADC_3) && (USBD_ADC3_DEV == 3))                  // USB Device 3 Audio Class 3
#define USBD3_ADC3                          1
#define USBD3_ADC3_IF_SPKR                 (USBD_ADC3_EP_ISO_OUT_EN == 1)
#define USBD3_ADC3_IF_MIC                  (USBD_ADC3_EP_ISO_IN_EN  == 1)
#define USBD3_ADC3_IF_CNT                  (1+USBD3_ADC3_IF_SPKR+USBD3_ADC3_IF_MIC)
#define USBD3_ADC3_EP_CNT                  (USBD_ADC3_EP_ISO_OUT_EN+USBD_ADC3_EP_ISO_IN_EN)
#define USBD3_ADC3_STR_CNT                 (1+USBD3_ADC3_IF_SPKR*2+USBD3_ADC3_IF_MIC*2)
#define USBD3_ADC3_OUT_CH_NUM              (USBD_ADC3_OUT_CH_NUM)
#define USBD3_ADC3_IN_CH_NUM               (USBD_ADC3_IN_CH_NUM)
#define USBD_ADC3_HS                       (USBD3_HS)
#define USBD_ADC3_IF_SPKR                  (USBD3_ADC3_IF_SPKR)
#define USBD_ADC3_IF_MIC                   (USBD3_ADC3_IF_MIC)
#define USBD_ADC3_IF_CTRL_NUM              (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC0_IF_CNT+USBD3_ADC1_IF_CNT+USBD3_ADC2_IF_CNT)
#define USBD_ADC3_IF_SPKR_NUM              (USBD_ADC3_IF_CTRL_NUM+USBD3_ADC3_IF_SPKR)
#define USBD_ADC3_IF_MIC_NUM               (USBD_ADC3_IF_SPKR_NUM+USBD3_ADC3_IF_MIC)
#define USBD_ADC3_IF_CNT                   (USBD3_ADC3_IF_CNT)
#define USBD_ADC3_EP_CNT                   (USBD3_ADC3_EP_CNT)
#define USBD_ADC3_IF_CTRL_STR_IDX          (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC0_STR_CNT+USBD3_ADC1_STR_CNT+USBD3_ADC2_STR_CNT)
#define USBD_ADC3_IF_SPKR_ALT0_STR_IDX     (USBD_ADC3_IF_CTRL_STR_IDX+USBD3_ADC3_IF_SPKR)
#define USBD_ADC3_IF_SPKR_ALT1_STR_IDX     (USBD_ADC3_IF_CTRL_STR_IDX+USBD3_ADC3_IF_SPKR*2)
#define USBD_ADC3_IF_MIC_ALT0_STR_IDX      (USBD_ADC3_IF_SPKR_ALT1_STR_IDX+USBD3_ADC3_IF_MIC)
#define USBD_ADC3_IF_MIC_ALT1_STR_IDX      (USBD_ADC3_IF_SPKR_ALT1_STR_IDX+USBD3_ADC3_IF_MIC*2)
#define USBD_ADC3_STR_CNT                  (USBD3_ADC3_STR_CNT)
#if    ((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC3_EP_ISO_OUT)
#endif
#if    ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_ADC3_EP_ISO_IN)
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  1) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  2) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  3) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  4) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  5) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  6) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  7) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  8) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) ==  9) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) == 10) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) == 11) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) == 12) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) == 13) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) == 14) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_adc_thread_id[0]
#endif
#if   (((USBD_ADC3_EP_ISO_OUT_EN * USBD_ADC3_EP_ISO_OUT) == 15) || ((USBD_ADC3_EP_ISO_IN_EN * USBD_ADC3_EP_ISO_IN) == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_adc_thread_id[0]
#endif
#else
#define USBD3_ADC3                          0
#define USBD3_ADC3_IF_SPKR                  0
#define USBD3_ADC3_IF_MIC                   0
#define USBD3_ADC3_IF_CNT                   0
#define USBD3_ADC3_EP_CNT                   0
#define USBD3_ADC3_STR_CNT                  0
#define USBD3_ADC3_OUT_CH_NUM               0
#define USBD3_ADC3_IN_CH_NUM                0
#endif

#define USBD3_ADC_CNT                      (USBD3_ADC0+USBD3_ADC1+USBD3_ADC2+USBD3_ADC3)
#define USBD3_ADC_IF_SPKR                  (USBD3_ADC0_IF_SPKR+USBD3_ADC1_IF_SPKR+USBD3_ADC2_IF_SPKR+USBD3_ADC3_IF_SPKR)
#define USBD3_ADC_IF_MIC                   (USBD3_ADC0_IF_MIC+USBD3_ADC1_IF_MIC+USBD3_ADC2_IF_MIC+USBD3_ADC3_IF_MIC)
#define USBD3_ADC_IF_CNT                   (USBD3_ADC0_IF_CNT+USBD3_ADC1_IF_CNT+USBD3_ADC2_IF_CNT+USBD3_ADC3_IF_CNT)
#define USBD3_ADC_EP_CNT                   (USBD3_ADC0_EP_CNT+USBD3_ADC1_EP_CNT+USBD3_ADC2_EP_CNT+USBD3_ADC3_EP_CNT)
#define USBD3_ADC_STR_CNT                  (USBD3_ADC0_STR_CNT+USBD3_ADC1_STR_CNT+USBD3_ADC2_STR_CNT+USBD3_ADC3_STR_CNT)

#if    (defined(RTE_USB_Device_CDC_0) && (USBD_CDC0_DEV == 3))                  // USB Device 3 Communication Device Class 0
#define USBD3_CDC0                          1
#define USBD3_CDC0_SUBCLASS                 USBD_CDC0_SUBCLASS
#define USBD3_CDC0_ACM                     (USBD_CDC0_SUBCLASS==2)
#define USBD3_CDC0_NCM                     (USBD_CDC0_SUBCLASS==13)
#define USBD3_CDC0_PROTOCOL                 USBD_CDC0_PROTOCOL
#define USBD3_CDC0_RNDIS                  ((USBD_CDC0_SUBCLASS==2)&&(USBD_CDC0_PROTOCOL==255))
#define USBD3_CDC0_IAD                     (USBD3_CDC0_RNDIS)
#define USBD3_CDC0_IF_CNT                   2
#define USBD3_CDC0_IF0_EP_CNT               1
#define USBD3_CDC0_IF1_EP_CNT               2
#define USBD3_CDC0_EP_CNT                  (USBD3_CDC0_IF0_EP_CNT+USBD3_CDC0_IF1_EP_CNT)
#define USBD3_CDC0_STR_CNT                 (USBD3_CDC0_NCM+2)
#define USBD3_CDC0_MS_COMPAT_CNT           (USBD3_CDC0_RNDIS)
#define USBD_CDC0_HS                       (USBD3_HS)
#define USBD_CDC0_ACM                      (USBD3_CDC0_ACM)
#define USBD_CDC0_NCM                      (USBD3_CDC0_NCM)
#define USBD_CDC0_RNDIS                    (USBD3_CDC0_RNDIS)
#define USBD_CDC0_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT)
#define USBD_CDC0_IF1_NUM                  (USBD_CDC0_IF0_NUM+1)
#define USBD_CDC0_IF_CNT                   (USBD3_CDC0_IF_CNT)
#define USBD_CDC0_EP_CNT                   (USBD3_CDC0_EP_CNT)
#define USBD_CDC0_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT)
#define USBD_CDC0_IF1_STR_IDX              (USBD_CDC0_IF0_STR_IDX+1)
#define USBD_CDC0_IMAC_STR_IDX             (USBD_CDC0_IF0_STR_IDX+2)
#define USBD_CDC0_STR_CNT                  (USBD3_CDC0_STR_CNT)
#if    (USBD_CDC0_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC0_EP_INT_IN)
#endif
#if    (USBD_CDC0_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC0_EP_BULK_IN)
#endif
#if    (USBD_CDC0_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC0_EP_BULK_OUT)
#endif
#if    (USBD_CDC0_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[0]
#endif
#if    (USBD_CDC0_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  1) || (USBD_CDC0_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  2) || (USBD_CDC0_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  3) || (USBD_CDC0_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  4) || (USBD_CDC0_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  5) || (USBD_CDC0_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  6) || (USBD_CDC0_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  7) || (USBD_CDC0_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  8) || (USBD_CDC0_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN ==  9) || (USBD_CDC0_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN == 10) || (USBD_CDC0_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN == 11) || (USBD_CDC0_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN == 12) || (USBD_CDC0_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN == 13) || (USBD_CDC0_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN == 14) || (USBD_CDC0_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[0]
#endif
#if   ((USBD_CDC0_EP_BULK_IN == 15) || (USBD_CDC0_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[0]
#endif
#else
#define USBD3_CDC0                          0
#define USBD3_CDC0_ACM                      0
#define USBD3_CDC0_NCM                      0
#define USBD3_CDC0_RNDIS                    0
#define USBD3_CDC0_IAD                      0
#define USBD3_CDC0_IF_CNT                   0
#define USBD3_CDC0_EP_CNT                   0
#define USBD3_CDC0_STR_CNT                  0
#define USBD3_CDC0_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_1) && (USBD_CDC1_DEV == 3))                  // USB Device 3 Communication Device Class 1
#define USBD3_CDC1                          1
#define USBD3_CDC1_SUBCLASS                 USBD_CDC1_SUBCLASS
#define USBD3_CDC1_ACM                     (USBD_CDC1_SUBCLASS==2)
#define USBD3_CDC1_NCM                     (USBD_CDC1_SUBCLASS==13)
#define USBD3_CDC1_PROTOCOL                 USBD_CDC1_PROTOCOL
#define USBD3_CDC1_RNDIS                  ((USBD_CDC1_SUBCLASS==2)&&(USBD_CDC1_PROTOCOL==255))
#define USBD3_CDC1_IAD                     (USBD3_CDC1_RNDIS)
#define USBD3_CDC1_IF_CNT                   2
#define USBD3_CDC1_IF0_EP_CNT               1
#define USBD3_CDC1_IF1_EP_CNT               2
#define USBD3_CDC1_EP_CNT                  (USBD3_CDC1_IF0_EP_CNT+USBD3_CDC1_IF1_EP_CNT)
#define USBD3_CDC1_STR_CNT                 (USBD3_CDC1_NCM+2)
#define USBD3_CDC1_MS_COMPAT_CNT           (USBD3_CDC1_RNDIS)
#define USBD_CDC1_HS                       (USBD3_HS)
#define USBD_CDC1_ACM                      (USBD3_CDC1_ACM)
#define USBD_CDC1_NCM                      (USBD3_CDC1_NCM)
#define USBD_CDC1_RNDIS                    (USBD3_CDC1_RNDIS)
#define USBD_CDC1_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT)
#define USBD_CDC1_IF1_NUM                  (USBD_CDC1_IF0_NUM+1)
#define USBD_CDC1_IF_CNT                   (USBD3_CDC1_IF_CNT)
#define USBD_CDC1_EP_CNT                   (USBD3_CDC1_EP_CNT)
#define USBD_CDC1_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT)
#define USBD_CDC1_IF1_STR_IDX              (USBD_CDC1_IF0_STR_IDX+1)
#define USBD_CDC1_IMAC_STR_IDX             (USBD_CDC1_IF0_STR_IDX+2)
#define USBD_CDC1_STR_CNT                  (USBD3_CDC1_STR_CNT)
#if    (USBD_CDC1_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC1_EP_INT_IN)
#endif
#if    (USBD_CDC1_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC1_EP_BULK_IN)
#endif
#if    (USBD_CDC1_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC1_EP_BULK_OUT)
#endif
#if    (USBD_CDC1_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[1]
#endif
#if    (USBD_CDC1_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  1) || (USBD_CDC1_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  2) || (USBD_CDC1_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  3) || (USBD_CDC1_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  4) || (USBD_CDC1_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  5) || (USBD_CDC1_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  6) || (USBD_CDC1_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  7) || (USBD_CDC1_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  8) || (USBD_CDC1_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN ==  9) || (USBD_CDC1_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN == 10) || (USBD_CDC1_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN == 11) || (USBD_CDC1_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN == 12) || (USBD_CDC1_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN == 13) || (USBD_CDC1_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN == 14) || (USBD_CDC1_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[1]
#endif
#if   ((USBD_CDC1_EP_BULK_IN == 15) || (USBD_CDC1_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[1]
#endif
#else
#define USBD3_CDC1                          0
#define USBD3_CDC1_ACM                      0
#define USBD3_CDC1_NCM                      0
#define USBD3_CDC1_RNDIS                    0
#define USBD3_CDC1_IAD                      0
#define USBD3_CDC1_IF_CNT                   0
#define USBD3_CDC1_EP_CNT                   0
#define USBD3_CDC1_STR_CNT                  0
#define USBD3_CDC1_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_2) && (USBD_CDC2_DEV == 3))                  // USB Device 3 Communication Device Class 2
#define USBD3_CDC2                          1
#define USBD3_CDC2_SUBCLASS                 USBD_CDC2_SUBCLASS
#define USBD3_CDC2_ACM                     (USBD_CDC2_SUBCLASS==2)
#define USBD3_CDC2_NCM                     (USBD_CDC2_SUBCLASS==13)
#define USBD3_CDC2_PROTOCOL                 USBD_CDC2_PROTOCOL
#define USBD3_CDC2_RNDIS                  ((USBD_CDC2_SUBCLASS==2)&&(USBD_CDC2_PROTOCOL==255))
#define USBD3_CDC2_IAD                     (USBD3_CDC2_RNDIS)
#define USBD3_CDC2_IF_CNT                   2
#define USBD3_CDC2_IF0_EP_CNT               1
#define USBD3_CDC2_IF1_EP_CNT               2
#define USBD3_CDC2_EP_CNT                  (USBD3_CDC2_IF0_EP_CNT+USBD3_CDC2_IF1_EP_CNT)
#define USBD3_CDC2_STR_CNT                 (USBD3_CDC2_NCM+2)
#define USBD3_CDC2_MS_COMPAT_CNT           (USBD3_CDC2_RNDIS)
#define USBD_CDC2_HS                       (USBD3_HS)
#define USBD_CDC2_ACM                      (USBD3_CDC2_ACM)
#define USBD_CDC2_NCM                      (USBD3_CDC2_NCM)
#define USBD_CDC2_RNDIS                    (USBD3_CDC2_RNDIS)
#define USBD_CDC2_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT+USBD3_CDC1_IF_CNT)
#define USBD_CDC2_IF1_NUM                  (USBD_CDC2_IF0_NUM+1)
#define USBD_CDC2_IF_CNT                   (USBD3_CDC2_IF_CNT)
#define USBD_CDC2_EP_CNT                   (USBD3_CDC2_EP_CNT)
#define USBD_CDC2_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT+USBD3_CDC1_STR_CNT)
#define USBD_CDC2_IF1_STR_IDX              (USBD_CDC2_IF0_STR_IDX+1)
#define USBD_CDC2_IMAC_STR_IDX             (USBD_CDC2_IF0_STR_IDX+2)
#define USBD_CDC2_STR_CNT                  (USBD3_CDC2_STR_CNT)
#if    (USBD_CDC2_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC2_EP_INT_IN)
#endif
#if    (USBD_CDC2_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC2_EP_BULK_IN)
#endif
#if    (USBD_CDC2_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC2_EP_BULK_OUT)
#endif
#if    (USBD_CDC2_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[2]
#endif
#if    (USBD_CDC2_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  1) || (USBD_CDC2_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  2) || (USBD_CDC2_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  3) || (USBD_CDC2_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  4) || (USBD_CDC2_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  5) || (USBD_CDC2_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  6) || (USBD_CDC2_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  7) || (USBD_CDC2_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  8) || (USBD_CDC2_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN ==  9) || (USBD_CDC2_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN == 10) || (USBD_CDC2_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN == 11) || (USBD_CDC2_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN == 12) || (USBD_CDC2_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN == 13) || (USBD_CDC2_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN == 14) || (USBD_CDC2_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[2]
#endif
#if   ((USBD_CDC2_EP_BULK_IN == 15) || (USBD_CDC2_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[2]
#endif
#else
#define USBD3_CDC2                          0
#define USBD3_CDC2_ACM                      0
#define USBD3_CDC2_NCM                      0
#define USBD3_CDC2_RNDIS                    0
#define USBD3_CDC2_IAD                      0
#define USBD3_CDC2_IF_CNT                   0
#define USBD3_CDC2_EP_CNT                   0
#define USBD3_CDC2_STR_CNT                  0
#define USBD3_CDC2_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_3) && (USBD_CDC3_DEV == 3))                  // USB Device 3 Communication Device Class 3
#define USBD3_CDC3                          1
#define USBD3_CDC3_SUBCLASS                 USBD_CDC3_SUBCLASS
#define USBD3_CDC3_ACM                     (USBD_CDC3_SUBCLASS==2)
#define USBD3_CDC3_NCM                     (USBD_CDC3_SUBCLASS==13)
#define USBD3_CDC3_PROTOCOL                 USBD_CDC3_PROTOCOL
#define USBD3_CDC3_RNDIS                  ((USBD_CDC3_SUBCLASS==2)&&(USBD_CDC3_PROTOCOL==255))
#define USBD3_CDC3_IAD                     (USBD3_CDC3_RNDIS)
#define USBD3_CDC3_IF_CNT                   2
#define USBD3_CDC3_IF0_EP_CNT               1
#define USBD3_CDC3_IF1_EP_CNT               2
#define USBD3_CDC3_EP_CNT                  (USBD3_CDC3_IF0_EP_CNT+USBD3_CDC3_IF1_EP_CNT)
#define USBD3_CDC3_STR_CNT                 (USBD3_CDC3_NCM+2)
#define USBD3_CDC3_MS_COMPAT_CNT           (USBD3_CDC3_RNDIS)
#define USBD_CDC3_HS                       (USBD3_HS)
#define USBD_CDC3_ACM                      (USBD3_CDC3_ACM)
#define USBD_CDC3_NCM                      (USBD3_CDC3_NCM)
#define USBD_CDC3_RNDIS                    (USBD3_CDC3_RNDIS)
#define USBD_CDC3_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT+USBD3_CDC1_IF_CNT+USBD3_CDC2_IF_CNT)
#define USBD_CDC3_IF1_NUM                  (USBD_CDC3_IF0_NUM+1)
#define USBD_CDC3_IF_CNT                   (USBD3_CDC3_IF_CNT)
#define USBD_CDC3_EP_CNT                   (USBD3_CDC3_EP_CNT)
#define USBD_CDC3_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT+USBD3_CDC1_STR_CNT+USBD3_CDC2_STR_CNT)
#define USBD_CDC3_IF1_STR_IDX              (USBD_CDC3_IF0_STR_IDX+1)
#define USBD_CDC3_IMAC_STR_IDX             (USBD_CDC3_IF0_STR_IDX+2)
#define USBD_CDC3_STR_CNT                  (USBD3_CDC3_STR_CNT)
#if    (USBD_CDC3_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC3_EP_INT_IN)
#endif
#if    (USBD_CDC3_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC3_EP_BULK_IN)
#endif
#if    (USBD_CDC3_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC3_EP_BULK_OUT)
#endif
#if    (USBD_CDC3_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[3]
#endif
#if    (USBD_CDC3_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  1) || (USBD_CDC3_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  2) || (USBD_CDC3_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  3) || (USBD_CDC3_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  4) || (USBD_CDC3_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  5) || (USBD_CDC3_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  6) || (USBD_CDC3_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  7) || (USBD_CDC3_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  8) || (USBD_CDC3_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN ==  9) || (USBD_CDC3_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN == 10) || (USBD_CDC3_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN == 11) || (USBD_CDC3_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN == 12) || (USBD_CDC3_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN == 13) || (USBD_CDC3_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN == 14) || (USBD_CDC3_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[3]
#endif
#if   ((USBD_CDC3_EP_BULK_IN == 15) || (USBD_CDC3_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[3]
#endif
#else
#define USBD3_CDC3                          0
#define USBD3_CDC3_ACM                      0
#define USBD3_CDC3_NCM                      0
#define USBD3_CDC3_RNDIS                    0
#define USBD3_CDC3_IAD                      0
#define USBD3_CDC3_IF_CNT                   0
#define USBD3_CDC3_EP_CNT                   0
#define USBD3_CDC3_STR_CNT                  0
#define USBD3_CDC3_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_4) && (USBD_CDC4_DEV == 3))                  // USB Device 3 Communication Device Class 4
#define USBD3_CDC4                          1
#define USBD3_CDC4_SUBCLASS                 USBD_CDC4_SUBCLASS
#define USBD3_CDC4_ACM                     (USBD_CDC4_SUBCLASS==2)
#define USBD3_CDC4_NCM                     (USBD_CDC4_SUBCLASS==13)
#define USBD3_CDC4_PROTOCOL                 USBD_CDC4_PROTOCOL
#define USBD3_CDC4_RNDIS                  ((USBD_CDC4_SUBCLASS==2)&&(USBD_CDC4_PROTOCOL==255))
#define USBD3_CDC4_IAD                     (USBD3_CDC4_RNDIS)
#define USBD3_CDC4_IF_CNT                   2
#define USBD3_CDC4_IF0_EP_CNT               1
#define USBD3_CDC4_IF1_EP_CNT               2
#define USBD3_CDC4_EP_CNT                  (USBD3_CDC4_IF0_EP_CNT+USBD3_CDC4_IF1_EP_CNT)
#define USBD3_CDC4_STR_CNT                 (USBD3_CDC4_NCM+2)
#define USBD3_CDC4_MS_COMPAT_CNT           (USBD3_CDC4_RNDIS)
#define USBD_CDC4_HS                       (USBD3_HS)
#define USBD_CDC4_ACM                      (USBD3_CDC4_ACM)
#define USBD_CDC4_NCM                      (USBD3_CDC4_NCM)
#define USBD_CDC4_RNDIS                    (USBD3_CDC4_RNDIS)
#define USBD_CDC4_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT+USBD3_CDC1_IF_CNT+USBD3_CDC2_IF_CNT+USBD3_CDC3_IF_CNT)
#define USBD_CDC4_IF1_NUM                  (USBD_CDC4_IF0_NUM+1)
#define USBD_CDC4_IF_CNT                   (USBD3_CDC3_IF_CNT)
#define USBD_CDC4_EP_CNT                   (USBD3_CDC3_EP_CNT)
#define USBD_CDC4_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT+USBD3_CDC1_STR_CNT+USBD3_CDC2_STR_CNT+USBD3_CDC3_STR_CNT)
#define USBD_CDC4_IF1_STR_IDX              (USBD_CDC4_IF0_STR_IDX+1)
#define USBD_CDC4_IMAC_STR_IDX             (USBD_CDC4_IF0_STR_IDX+2)
#define USBD_CDC4_STR_CNT                  (USBD3_CDC4_STR_CNT)
#if    (USBD_CDC4_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC4_EP_INT_IN)
#endif
#if    (USBD_CDC4_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC4_EP_BULK_IN)
#endif
#if    (USBD_CDC4_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC4_EP_BULK_OUT)
#endif
#if    (USBD_CDC4_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[4]
#endif
#if    (USBD_CDC4_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  1) || (USBD_CDC4_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  2) || (USBD_CDC4_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  3) || (USBD_CDC4_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  4) || (USBD_CDC4_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  5) || (USBD_CDC4_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  6) || (USBD_CDC4_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  7) || (USBD_CDC4_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  8) || (USBD_CDC4_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN ==  9) || (USBD_CDC4_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN == 10) || (USBD_CDC4_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN == 11) || (USBD_CDC4_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN == 12) || (USBD_CDC4_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN == 13) || (USBD_CDC4_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN == 14) || (USBD_CDC4_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[4]
#endif
#if   ((USBD_CDC4_EP_BULK_IN == 15) || (USBD_CDC4_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[4]
#endif
#else
#define USBD3_CDC4                          0
#define USBD3_CDC4_ACM                      0
#define USBD3_CDC4_NCM                      0
#define USBD3_CDC4_RNDIS                    0
#define USBD3_CDC4_IAD                      0
#define USBD3_CDC4_IF_CNT                   0
#define USBD3_CDC4_EP_CNT                   0
#define USBD3_CDC4_STR_CNT                  0
#define USBD3_CDC4_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_5) && (USBD_CDC5_DEV == 3))                  // USB Device 3 Communication Device Class 5
#define USBD3_CDC5                          1
#define USBD3_CDC5_SUBCLASS                 USBD_CDC5_SUBCLASS
#define USBD3_CDC5_ACM                     (USBD_CDC5_SUBCLASS==2)
#define USBD3_CDC5_NCM                     (USBD_CDC5_SUBCLASS==13)
#define USBD3_CDC5_PROTOCOL                 USBD_CDC5_PROTOCOL
#define USBD3_CDC5_RNDIS                  ((USBD_CDC5_SUBCLASS==2)&&(USBD_CDC5_PROTOCOL==255))
#define USBD3_CDC5_IAD                     (USBD3_CDC5_RNDIS)
#define USBD3_CDC5_IF_CNT                   2
#define USBD3_CDC5_IF0_EP_CNT               1
#define USBD3_CDC5_IF1_EP_CNT               2
#define USBD3_CDC5_EP_CNT                  (USBD3_CDC5_IF0_EP_CNT+USBD3_CDC5_IF1_EP_CNT)
#define USBD3_CDC5_STR_CNT                 (USBD3_CDC5_NCM+2)
#define USBD3_CDC5_MS_COMPAT_CNT           (USBD3_CDC5_RNDIS)
#define USBD_CDC5_HS                       (USBD3_HS)
#define USBD_CDC5_ACM                      (USBD3_CDC5_ACM)
#define USBD_CDC5_NCM                      (USBD3_CDC5_NCM)
#define USBD_CDC5_RNDIS                    (USBD3_CDC5_RNDIS)
#define USBD_CDC5_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT+USBD3_CDC1_IF_CNT+USBD3_CDC2_IF_CNT+USBD3_CDC3_IF_CNT+USBD3_CDC4_IF_CNT)
#define USBD_CDC5_IF1_NUM                  (USBD_CDC5_IF0_NUM+1)
#define USBD_CDC5_IF_CNT                   (USBD3_CDC3_IF_CNT)
#define USBD_CDC5_EP_CNT                   (USBD3_CDC3_EP_CNT)
#define USBD_CDC5_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT+USBD3_CDC1_STR_CNT+USBD3_CDC2_STR_CNT+USBD3_CDC3_STR_CNT+USBD3_CDC4_STR_CNT)
#define USBD_CDC5_IF1_STR_IDX              (USBD_CDC5_IF0_STR_IDX+1)
#define USBD_CDC5_IMAC_STR_IDX             (USBD_CDC5_IF0_STR_IDX+2)
#define USBD_CDC5_STR_CNT                  (USBD3_CDC5_STR_CNT)
#if    (USBD_CDC5_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC5_EP_INT_IN)
#endif
#if    (USBD_CDC5_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC5_EP_BULK_IN)
#endif
#if    (USBD_CDC5_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC5_EP_BULK_OUT)
#endif
#if    (USBD_CDC5_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[5]
#endif
#if    (USBD_CDC5_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  1) || (USBD_CDC5_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  2) || (USBD_CDC5_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  3) || (USBD_CDC5_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  4) || (USBD_CDC5_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  5) || (USBD_CDC5_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  6) || (USBD_CDC5_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  7) || (USBD_CDC5_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  8) || (USBD_CDC5_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN ==  9) || (USBD_CDC5_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN == 10) || (USBD_CDC5_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN == 11) || (USBD_CDC5_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN == 12) || (USBD_CDC5_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN == 13) || (USBD_CDC5_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN == 14) || (USBD_CDC5_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[5]
#endif
#if   ((USBD_CDC5_EP_BULK_IN == 15) || (USBD_CDC5_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[5]
#endif
#else
#define USBD3_CDC5                          0
#define USBD3_CDC5_ACM                      0
#define USBD3_CDC5_NCM                      0
#define USBD3_CDC5_RNDIS                    0
#define USBD3_CDC5_IAD                      0
#define USBD3_CDC5_IF_CNT                   0
#define USBD3_CDC5_EP_CNT                   0
#define USBD3_CDC5_STR_CNT                  0
#define USBD3_CDC5_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_6) && (USBD_CDC6_DEV == 3))                  // USB Device 3 Communication Device Class 6
#define USBD3_CDC6                          1
#define USBD3_CDC6_SUBCLASS                 USBD_CDC6_SUBCLASS
#define USBD3_CDC6_ACM                     (USBD_CDC6_SUBCLASS==2)
#define USBD3_CDC6_NCM                     (USBD_CDC6_SUBCLASS==13)
#define USBD3_CDC6_PROTOCOL                 USBD_CDC6_PROTOCOL
#define USBD3_CDC6_RNDIS                  ((USBD_CDC6_SUBCLASS==2)&&(USBD_CDC6_PROTOCOL==255))
#define USBD3_CDC6_IAD                     (USBD3_CDC6_RNDIS)
#define USBD3_CDC6_IF_CNT                   2
#define USBD3_CDC6_IF0_EP_CNT               1
#define USBD3_CDC6_IF1_EP_CNT               2
#define USBD3_CDC6_EP_CNT                  (USBD3_CDC6_IF0_EP_CNT+USBD3_CDC6_IF1_EP_CNT)
#define USBD3_CDC6_STR_CNT                 (USBD3_CDC6_NCM+2)
#define USBD3_CDC6_MS_COMPAT_CNT           (USBD3_CDC6_RNDIS)
#define USBD_CDC6_HS                       (USBD3_HS)
#define USBD_CDC6_ACM                      (USBD3_CDC6_ACM)
#define USBD_CDC6_NCM                      (USBD3_CDC6_NCM)
#define USBD_CDC6_RNDIS                    (USBD3_CDC6_RNDIS)
#define USBD_CDC6_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT+USBD3_CDC1_IF_CNT+USBD3_CDC2_IF_CNT+USBD3_CDC3_IF_CNT+USBD3_CDC4_IF_CNT+USBD3_CDC5_IF_CNT)
#define USBD_CDC6_IF1_NUM                  (USBD_CDC6_IF0_NUM+1)
#define USBD_CDC6_IF_CNT                   (USBD3_CDC3_IF_CNT)
#define USBD_CDC6_EP_CNT                   (USBD3_CDC3_EP_CNT)
#define USBD_CDC6_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT+USBD3_CDC1_STR_CNT+USBD3_CDC2_STR_CNT+USBD3_CDC3_STR_CNT+USBD3_CDC4_STR_CNT+USBD3_CDC5_STR_CNT)
#define USBD_CDC6_IF1_STR_IDX              (USBD_CDC6_IF0_STR_IDX+1)
#define USBD_CDC6_IMAC_STR_IDX             (USBD_CDC6_IF0_STR_IDX+2)
#define USBD_CDC6_STR_CNT                  (USBD3_CDC6_STR_CNT)
#if    (USBD_CDC6_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC6_EP_INT_IN)
#endif
#if    (USBD_CDC6_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC6_EP_BULK_IN)
#endif
#if    (USBD_CDC6_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC6_EP_BULK_OUT)
#endif
#if    (USBD_CDC6_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[6]
#endif
#if    (USBD_CDC6_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  1) || (USBD_CDC6_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  2) || (USBD_CDC6_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  3) || (USBD_CDC6_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  4) || (USBD_CDC6_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  5) || (USBD_CDC6_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  6) || (USBD_CDC6_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  7) || (USBD_CDC6_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  8) || (USBD_CDC6_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN ==  9) || (USBD_CDC6_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN == 10) || (USBD_CDC6_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN == 11) || (USBD_CDC6_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN == 12) || (USBD_CDC6_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN == 13) || (USBD_CDC6_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN == 14) || (USBD_CDC6_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[6]
#endif
#if   ((USBD_CDC6_EP_BULK_IN == 15) || (USBD_CDC6_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[6]
#endif
#else
#define USBD3_CDC6                          0
#define USBD3_CDC6_ACM                      0
#define USBD3_CDC6_NCM                      0
#define USBD3_CDC6_RNDIS                    0
#define USBD3_CDC6_IAD                      0
#define USBD3_CDC6_IF_CNT                   0
#define USBD3_CDC6_EP_CNT                   0
#define USBD3_CDC6_STR_CNT                  0
#define USBD3_CDC6_MS_COMPAT_CNT            0
#endif

#if    (defined(RTE_USB_Device_CDC_7) && (USBD_CDC7_DEV == 3))                  // USB Device 3 Communication Device Class 7
#define USBD3_CDC7                          1
#define USBD3_CDC7_SUBCLASS                 USBD_CDC7_SUBCLASS
#define USBD3_CDC7_ACM                     (USBD_CDC7_SUBCLASS==2)
#define USBD3_CDC7_NCM                     (USBD_CDC7_SUBCLASS==13)
#define USBD3_CDC7_PROTOCOL                 USBD_CDC7_PROTOCOL
#define USBD3_CDC7_RNDIS                  ((USBD_CDC7_SUBCLASS==2)&&(USBD_CDC7_PROTOCOL==255))
#define USBD3_CDC7_IAD                     (USBD3_CDC7_RNDIS)
#define USBD3_CDC7_IF_CNT                   2
#define USBD3_CDC7_IF0_EP_CNT               1
#define USBD3_CDC7_IF1_EP_CNT               2
#define USBD3_CDC7_EP_CNT                  (USBD3_CDC7_IF0_EP_CNT+USBD3_CDC7_IF1_EP_CNT)
#define USBD3_CDC7_STR_CNT                 (USBD3_CDC7_NCM+2)
#define USBD3_CDC7_MS_COMPAT_CNT           (USBD3_CDC7_RNDIS)
#define USBD_CDC7_HS                       (USBD3_HS)
#define USBD_CDC7_ACM                      (USBD3_CDC7_ACM)
#define USBD_CDC7_NCM                      (USBD3_CDC7_NCM)
#define USBD_CDC7_RNDIS                    (USBD3_CDC7_RNDIS)
#define USBD_CDC7_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC0_IF_CNT+USBD3_CDC1_IF_CNT+USBD3_CDC2_IF_CNT+USBD3_CDC3_IF_CNT+USBD3_CDC4_IF_CNT+USBD3_CDC5_IF_CNT+USBD3_CDC6_IF_CNT)
#define USBD_CDC7_IF1_NUM                  (USBD_CDC7_IF0_NUM+1)
#define USBD_CDC7_IF_CNT                   (USBD3_CDC3_IF_CNT)
#define USBD_CDC7_EP_CNT                   (USBD3_CDC3_EP_CNT)
#define USBD_CDC7_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC0_STR_CNT+USBD3_CDC1_STR_CNT+USBD3_CDC2_STR_CNT+USBD3_CDC3_STR_CNT+USBD3_CDC4_STR_CNT+USBD3_CDC5_STR_CNT+USBD3_CDC6_STR_CNT)
#define USBD_CDC7_IF1_STR_IDX              (USBD_CDC7_IF0_STR_IDX+1)
#define USBD_CDC7_IMAC_STR_IDX             (USBD_CDC7_IF0_STR_IDX+2)
#define USBD_CDC7_STR_CNT                  (USBD3_CDC7_STR_CNT)
#if    (USBD_CDC7_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC7_EP_INT_IN)
#endif
#if    (USBD_CDC7_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC7_EP_BULK_IN)
#endif
#if    (USBD_CDC7_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_CDC7_EP_BULK_OUT)
#endif
#if    (USBD_CDC7_EP_INT_IN ==  1)
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  2)
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  3)
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  4)
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  5)
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  6)
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  7)
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  8)
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN ==  9)
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN == 10)
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN == 11)
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN == 12)
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN == 13)
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN == 14)
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_int_thread_id[7]
#endif
#if    (USBD_CDC7_EP_INT_IN == 15)
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_int_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  1) || (USBD_CDC7_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  2) || (USBD_CDC7_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  3) || (USBD_CDC7_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  4) || (USBD_CDC7_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  5) || (USBD_CDC7_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  6) || (USBD_CDC7_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  7) || (USBD_CDC7_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  8) || (USBD_CDC7_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN ==  9) || (USBD_CDC7_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN == 10) || (USBD_CDC7_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN == 11) || (USBD_CDC7_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN == 12) || (USBD_CDC7_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN == 13) || (USBD_CDC7_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN == 14) || (USBD_CDC7_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_cdc_bulk_thread_id[7]
#endif
#if   ((USBD_CDC7_EP_BULK_IN == 15) || (USBD_CDC7_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_cdc_bulk_thread_id[7]
#endif
#else
#define USBD3_CDC7                          0
#define USBD3_CDC7_ACM                      0
#define USBD3_CDC7_NCM                      0
#define USBD3_CDC7_RNDIS                    0
#define USBD3_CDC7_IAD                      0
#define USBD3_CDC7_IF_CNT                   0
#define USBD3_CDC7_EP_CNT                   0
#define USBD3_CDC7_STR_CNT                  0
#define USBD3_CDC7_MS_COMPAT_CNT            0
#endif

#define USBD3_CDC_CNT                      (USBD3_CDC0              +USBD3_CDC1              +USBD3_CDC2              +USBD3_CDC3              +USBD3_CDC4              +USBD3_CDC5              +USBD3_CDC6              +USBD3_CDC7)
#define USBD3_CDC_ACM_CNT                  (USBD3_CDC0_ACM          +USBD3_CDC1_ACM          +USBD3_CDC2_ACM          +USBD3_CDC3_ACM          +USBD3_CDC4_ACM          +USBD3_CDC5_ACM          +USBD3_CDC6_ACM          +USBD3_CDC7_ACM)
#define USBD3_CDC_NCM_CNT                  (USBD3_CDC0_NCM          +USBD3_CDC1_NCM          +USBD3_CDC2_NCM          +USBD3_CDC3_NCM          +USBD3_CDC4_NCM          +USBD3_CDC5_NCM          +USBD3_CDC6_NCM          +USBD3_CDC7_NCM)
#define USBD3_CDC_IF_CNT                   (USBD3_CDC0_IF_CNT       +USBD3_CDC1_IF_CNT       +USBD3_CDC2_IF_CNT       +USBD3_CDC3_IF_CNT       +USBD3_CDC4_IF_CNT       +USBD3_CDC5_IF_CNT       +USBD3_CDC6_IF_CNT       +USBD3_CDC7_IF_CNT)
#define USBD3_CDC_EP_CNT                   (USBD3_CDC0_EP_CNT       +USBD3_CDC1_EP_CNT       +USBD3_CDC2_EP_CNT       +USBD3_CDC3_EP_CNT       +USBD3_CDC4_EP_CNT       +USBD3_CDC5_EP_CNT       +USBD3_CDC6_EP_CNT       +USBD3_CDC7_EP_CNT)
#define USBD3_CDC_STR_CNT                  (USBD3_CDC0_STR_CNT      +USBD3_CDC1_STR_CNT      +USBD3_CDC2_STR_CNT      +USBD3_CDC3_STR_CNT      +USBD3_CDC4_STR_CNT      +USBD3_CDC5_STR_CNT      +USBD3_CDC6_STR_CNT      +USBD3_CDC7_STR_CNT)
#define USBD3_CDC_MS_COMPAT_CNT            (USBD3_CDC0_MS_COMPAT_CNT+USBD3_CDC1_MS_COMPAT_CNT+USBD3_CDC2_MS_COMPAT_CNT+USBD3_CDC3_MS_COMPAT_CNT+USBD3_CDC4_MS_COMPAT_CNT+USBD3_CDC5_MS_COMPAT_CNT+USBD3_CDC6_MS_COMPAT_CNT+USBD3_CDC7_MS_COMPAT_CNT)
#define USBD3_CDC_USE_IAD                 ((USBD3_CDC0_IAD!=0U) ||  (USBD3_CDC1_IAD!=0U) ||  (USBD3_CDC2_IAD!=0U) ||  (USBD3_CDC3_IAD!= 0U) || (USBD3_CDC4_IAD!= 0U) || (USBD3_CDC5_IAD!= 0U) || (USBD3_CDC6_IAD!= 0U) || (USBD3_CDC7_IAD!= 0U))

#if    (defined(RTE_USB_Device_HID_0) && (USBD_HID0_DEV == 3))                  // USB Device 3 HID Class 0
#define USBD3_HID0                          1
#define USBD3_HID0_IF_CNT                   1
#define USBD3_HID0_EP_CNT                  (1+(USBD_HID0_EP_INT_OUT != 0))
#define USBD3_HID0_STR_CNT                  1
#define USBD_HID0_HS                       (USBD3_HS)
#define USBD_HID0_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT)
#define USBD_HID0_IF_CNT                   (USBD3_HID0_IF_CNT)
#define USBD_HID0_EP_CNT                   (USBD3_HID0_EP_CNT)
#define USBD_HID0_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT)
#define USBD_HID0_IF_STR_CNT               (USBD3_HID0_IF_STR_CNT)
#if    (USBD_HID0_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID0_EP_INT_IN)
#endif
#if    (USBD_HID0_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID0_EP_INT_OUT)
#endif
#if   ((USBD_HID0_EP_INT_IN ==  1) || (USBD_HID0_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  2) || (USBD_HID0_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  3) || (USBD_HID0_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  4) || (USBD_HID0_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  5) || (USBD_HID0_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  6) || (USBD_HID0_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  7) || (USBD_HID0_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  8) || (USBD_HID0_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN ==  9) || (USBD_HID0_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN == 10) || (USBD_HID0_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN == 11) || (USBD_HID0_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN == 12) || (USBD_HID0_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN == 13) || (USBD_HID0_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN == 14) || (USBD_HID0_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[0]
#endif
#if   ((USBD_HID0_EP_INT_IN == 15) || (USBD_HID0_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[0]
#endif
#else
#define USBD3_HID0                          0
#define USBD3_HID0_IF_CNT                   0
#define USBD3_HID0_EP_CNT                   0
#define USBD3_HID0_STR_CNT                  0
#endif

#if    (defined(RTE_USB_Device_HID_1) && (USBD_HID1_DEV == 3))                  // USB Device 3 HID Class 1
#define USBD3_HID1                          1
#define USBD3_HID1_IF_CNT                   1
#define USBD3_HID1_EP_CNT                  (1+(USBD_HID1_EP_INT_OUT != 0))
#define USBD3_HID1_STR_CNT                  1
#define USBD_HID1_HS                       (USBD3_HS)
#define USBD_HID1_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT)
#define USBD_HID1_IF_CNT                   (USBD3_HID1_IF_CNT)
#define USBD_HID1_EP_CNT                   (USBD3_HID1_EP_CNT)
#define USBD_HID1_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT)
#define USBD_HID1_STR_CNT                  (USBD3_HID1_STR_CNT)
#if    (USBD_HID1_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID1_EP_INT_IN)
#endif
#if    (USBD_HID1_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID1_EP_INT_OUT)
#endif
#if   ((USBD_HID1_EP_INT_IN ==  1) || (USBD_HID1_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  2) || (USBD_HID1_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  3) || (USBD_HID1_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  4) || (USBD_HID1_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  5) || (USBD_HID1_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  6) || (USBD_HID1_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  7) || (USBD_HID1_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  8) || (USBD_HID1_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN ==  9) || (USBD_HID1_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN == 10) || (USBD_HID1_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN == 11) || (USBD_HID1_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN == 12) || (USBD_HID1_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN == 13) || (USBD_HID1_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN == 14) || (USBD_HID1_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[1]
#endif
#if   ((USBD_HID1_EP_INT_IN == 15) || (USBD_HID1_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[1]
#endif
#else
#define USBD3_HID1                          0
#define USBD3_HID1_IF_CNT                   0
#define USBD3_HID1_EP_CNT                   0
#define USBD3_HID1_STR_CNT                  0
#endif

#if    (defined(RTE_USB_Device_HID_2) && (USBD_HID2_DEV == 3))                  // USB Device 3 HID Class 2
#define USBD3_HID2                          1
#define USBD3_HID2_IF_CNT                   1
#define USBD3_HID2_EP_CNT                  (1+(USBD_HID2_EP_INT_OUT != 0))
#define USBD3_HID2_STR_CNT                  1
#define USBD_HID2_HS                       (USBD3_HS)
#define USBD_HID2_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT+USBD3_HID1_IF_CNT)
#define USBD_HID2_IF_CNT                   (USBD3_HID2_IF_CNT)
#define USBD_HID2_EP_CNT                   (USBD3_HID2_EP_CNT)
#define USBD_HID2_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT)
#define USBD_HID2_STR_CNT                  (USBD3_HID2_STR_CNT)
#if    (USBD_HID2_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID2_EP_INT_IN)
#endif
#if    (USBD_HID2_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID2_EP_INT_OUT)
#endif
#if   ((USBD_HID2_EP_INT_IN ==  1) || (USBD_HID2_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  2) || (USBD_HID2_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  3) || (USBD_HID2_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  4) || (USBD_HID2_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  5) || (USBD_HID2_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  6) || (USBD_HID2_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  7) || (USBD_HID2_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  8) || (USBD_HID2_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN ==  9) || (USBD_HID2_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN == 10) || (USBD_HID2_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN == 11) || (USBD_HID2_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN == 12) || (USBD_HID2_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN == 13) || (USBD_HID2_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN == 14) || (USBD_HID2_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[2]
#endif
#if   ((USBD_HID2_EP_INT_IN == 15) || (USBD_HID2_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[2]
#endif
#else
#define USBD3_HID2                         0
#define USBD3_HID2_IF_CNT                  0
#define USBD3_HID2_EP_CNT                  0
#define USBD3_HID2_STR_CNT                 0
#endif

#if    (defined(RTE_USB_Device_HID_3) && (USBD_HID3_DEV == 3))                  // USB Device 3 HID Class 3
#define USBD3_HID3                          1
#define USBD3_HID3_IF_CNT                   1
#define USBD3_HID3_EP_CNT                  (1+(USBD_HID3_EP_INT_OUT != 0))
#define USBD3_HID3_STR_CNT                  1
#define USBD_HID3_HS                       (USBD3_HS)
#define USBD_HID3_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT+USBD3_HID1_IF_CNT+USBD3_HID2_IF_CNT)
#define USBD_HID3_IF_CNT                   (USBD3_HID3_IF_CNT)
#define USBD_HID3_EP_CNT                   (USBD3_HID3_EP_CNT)
#define USBD_HID3_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT+USBD3_HID2_STR_CNT)
#define USBD_HID3_STR_CNT                  (USBD3_HID3_STR_CNT)
#if    (USBD_HID3_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID3_EP_INT_IN)
#endif
#if    (USBD_HID3_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID3_EP_INT_OUT)
#endif
#if   ((USBD_HID3_EP_INT_IN ==  1) || (USBD_HID3_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  2) || (USBD_HID3_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  3) || (USBD_HID3_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  4) || (USBD_HID3_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  5) || (USBD_HID3_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  6) || (USBD_HID3_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  7) || (USBD_HID3_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  8) || (USBD_HID3_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN ==  9) || (USBD_HID3_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN == 10) || (USBD_HID3_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN == 11) || (USBD_HID3_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN == 12) || (USBD_HID3_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN == 13) || (USBD_HID3_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN == 14) || (USBD_HID3_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[3]
#endif
#if   ((USBD_HID3_EP_INT_IN == 15) || (USBD_HID3_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[3]
#endif
#else
#define USBD3_HID3                          0
#define USBD3_HID3_IF_CNT                   0
#define USBD3_HID3_EP_CNT                   0
#define USBD3_HID3_STR_CNT                  0
#endif
#if    (defined(RTE_USB_Device_HID_4) && (USBD_HID4_DEV == 3))                  // USB Device 3 HID Class 4
#define USBD3_HID4                          1
#define USBD3_HID4_IF_CNT                   1
#define USBD3_HID4_EP_CNT                  (1+(USBD_HID4_EP_INT_OUT != 0))
#define USBD3_HID4_STR_CNT                  1
#define USBD_HID4_HS                       (USBD3_HS)
#define USBD_HID4_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT+USBD3_HID1_IF_CNT+USBD3_HID2_IF_CNT+USBD3_HID3_IF_CNT)
#define USBD_HID4_IF_CNT                   (USBD3_HID4_IF_CNT)
#define USBD_HID4_EP_CNT                   (USBD3_HID4_EP_CNT)
#define USBD_HID4_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT+USBD3_HID2_STR_CNT+USBD3_HID3_STR_CNT)
#define USBD_HID4_STR_CNT                  (USBD3_HID4_STR_CNT)
#if    (USBD_HID4_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID4_EP_INT_IN)
#endif
#if    (USBD_HID4_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID4_EP_INT_OUT)
#endif
#if   ((USBD_HID4_EP_INT_IN ==  1) || (USBD_HID4_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  2) || (USBD_HID4_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  3) || (USBD_HID4_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  4) || (USBD_HID4_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  5) || (USBD_HID4_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  6) || (USBD_HID4_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  7) || (USBD_HID4_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  8) || (USBD_HID4_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN ==  9) || (USBD_HID4_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN == 10) || (USBD_HID4_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN == 11) || (USBD_HID4_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN == 12) || (USBD_HID4_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN == 13) || (USBD_HID4_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN == 14) || (USBD_HID4_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[4]
#endif
#if   ((USBD_HID4_EP_INT_IN == 15) || (USBD_HID4_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[4]
#endif
#else
#define USBD3_HID4                          0
#define USBD3_HID4_IF_CNT                   0
#define USBD3_HID4_EP_CNT                   0
#define USBD3_HID4_STR_CNT                  0
#endif
#if    (defined(RTE_USB_Device_HID_5) && (USBD_HID5_DEV == 3))                  // USB Device 3 HID Class 5
#define USBD3_HID5                          1
#define USBD3_HID5_IF_CNT                   1
#define USBD3_HID5_EP_CNT                  (1+(USBD_HID5_EP_INT_OUT != 0))
#define USBD3_HID5_STR_CNT                  1
#define USBD_HID5_HS                       (USBD3_HS)
#define USBD_HID5_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT+USBD3_HID1_IF_CNT+USBD3_HID2_IF_CNT+USBD3_HID3_IF_CNT+USBD3_HID4_IF_CNT)
#define USBD_HID5_IF_CNT                   (USBD3_HID5_IF_CNT)
#define USBD_HID5_EP_CNT                   (USBD3_HID5_EP_CNT)
#define USBD_HID5_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT+USBD3_HID2_STR_CNT+USBD3_HID3_STR_CNT+USBD3_HID4_STR_CNT)
#define USBD_HID5_STR_CNT                  (USBD3_HID5_STR_CNT)
#if    (USBD_HID5_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID5_EP_INT_IN)
#endif
#if    (USBD_HID5_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID5_EP_INT_OUT)
#endif
#if   ((USBD_HID5_EP_INT_IN ==  1) || (USBD_HID5_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  2) || (USBD_HID5_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  3) || (USBD_HID5_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  4) || (USBD_HID5_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  5) || (USBD_HID5_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  6) || (USBD_HID5_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  7) || (USBD_HID5_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  8) || (USBD_HID5_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN ==  9) || (USBD_HID5_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN == 10) || (USBD_HID5_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN == 11) || (USBD_HID5_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN == 12) || (USBD_HID5_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN == 13) || (USBD_HID5_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN == 14) || (USBD_HID5_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[5]
#endif
#if   ((USBD_HID5_EP_INT_IN == 15) || (USBD_HID5_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[5]
#endif
#else
#define USBD3_HID5                          0
#define USBD3_HID5_IF_CNT                   0
#define USBD3_HID5_EP_CNT                   0
#define USBD3_HID5_STR_CNT                  0
#endif
#if    (defined(RTE_USB_Device_HID_6) && (USBD_HID6_DEV == 3))                  // USB Device 3 HID Class 6
#define USBD3_HID6                          1
#define USBD3_HID6_IF_CNT                   1
#define USBD3_HID6_EP_CNT                  (1+(USBD_HID6_EP_INT_OUT != 0))
#define USBD3_HID6_STR_CNT                  1
#define USBD_HID6_HS                       (USBD3_HS)
#define USBD_HID6_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT+USBD3_HID1_IF_CNT+USBD3_HID2_IF_CNT+USBD3_HID3_IF_CNT+USBD3_HID4_IF_CNT+USBD3_HID5_IF_CNT)
#define USBD_HID6_IF_CNT                   (USBD3_HID6_IF_CNT)
#define USBD_HID6_EP_CNT                   (USBD3_HID6_EP_CNT)
#define USBD_HID6_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT+USBD3_HID2_STR_CNT+USBD3_HID3_STR_CNT+USBD3_HID4_STR_CNT+USBD3_HID5_STR_CNT)
#define USBD_HID6_STR_CNT                  (USBD3_HID6_STR_CNT)
#if    (USBD_HID6_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID6_EP_INT_IN)
#endif
#if    (USBD_HID6_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID6_EP_INT_OUT)
#endif
#if   ((USBD_HID6_EP_INT_IN ==  1) || (USBD_HID6_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  2) || (USBD_HID6_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  3) || (USBD_HID6_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  4) || (USBD_HID6_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  5) || (USBD_HID6_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  6) || (USBD_HID6_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  7) || (USBD_HID6_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  8) || (USBD_HID6_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN ==  9) || (USBD_HID6_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN == 10) || (USBD_HID6_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN == 11) || (USBD_HID6_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN == 12) || (USBD_HID6_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN == 13) || (USBD_HID6_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN == 14) || (USBD_HID6_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[6]
#endif
#if   ((USBD_HID6_EP_INT_IN == 15) || (USBD_HID6_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[6]
#endif
#else
#define USBD3_HID6                          0
#define USBD3_HID6_IF_CNT                   0
#define USBD3_HID6_EP_CNT                   0
#define USBD3_HID6_STR_CNT                  0
#endif
#if    (defined(RTE_USB_Device_HID_7) && (USBD_HID7_DEV == 3))                  // USB Device 3 HID Class 7
#define USBD3_HID7                          1
#define USBD3_HID7_IF_CNT                   1
#define USBD3_HID7_EP_CNT                  (1+(USBD_HID7_EP_INT_OUT != 0))
#define USBD3_HID7_STR_CNT                  1
#define USBD_HID7_HS                       (USBD3_HS)
#define USBD_HID7_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT +USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID0_IF_CNT+USBD3_HID1_IF_CNT+USBD3_HID2_IF_CNT+USBD3_HID3_IF_CNT+USBD3_HID4_IF_CNT+USBD3_HID5_IF_CNT+USBD3_HID6_IF_CNT)
#define USBD_HID7_IF_CNT                   (USBD3_HID7_IF_CNT)
#define USBD_HID7_EP_CNT                   (USBD3_HID7_EP_CNT)
#define USBD_HID7_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT+USBD3_HID2_STR_CNT+USBD3_HID3_STR_CNT+USBD3_HID4_STR_CNT+USBD3_HID5_STR_CNT+USBD3_HID6_STR_CNT)
#define USBD_HID7_STR_CNT                  (USBD3_HID7_STR_CNT)
#if    (USBD_HID7_EP_INT_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID7_EP_INT_IN)
#endif
#if    (USBD_HID7_EP_INT_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_HID7_EP_INT_OUT)
#endif
#if   ((USBD_HID7_EP_INT_IN ==  1) || (USBD_HID7_EP_INT_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  2) || (USBD_HID7_EP_INT_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  3) || (USBD_HID7_EP_INT_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  4) || (USBD_HID7_EP_INT_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  5) || (USBD_HID7_EP_INT_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  6) || (USBD_HID7_EP_INT_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  7) || (USBD_HID7_EP_INT_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  8) || (USBD_HID7_EP_INT_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN ==  9) || (USBD_HID7_EP_INT_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN == 10) || (USBD_HID7_EP_INT_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN == 11) || (USBD_HID7_EP_INT_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN == 12) || (USBD_HID7_EP_INT_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN == 13) || (USBD_HID7_EP_INT_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN == 14) || (USBD_HID7_EP_INT_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_hid_thread_id[7]
#endif
#if   ((USBD_HID7_EP_INT_IN == 15) || (USBD_HID7_EP_INT_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_hid_thread_id[7]
#endif
#else
#define USBD3_HID7                          0
#define USBD3_HID7_IF_CNT                   0
#define USBD3_HID7_EP_CNT                   0
#define USBD3_HID7_STR_CNT                  0
#endif
#define USBD3_HID_CNT                      (USBD3_HID0        +USBD3_HID1        +USBD3_HID2        +USBD3_HID3        +USBD3_HID4        +USBD3_HID5        +USBD3_HID6        +USBD3_HID7)
#define USBD3_HID_IF_CNT                   (USBD3_HID0_IF_CNT +USBD3_HID1_IF_CNT +USBD3_HID2_IF_CNT +USBD3_HID3_IF_CNT +USBD3_HID4_IF_CNT +USBD3_HID5_IF_CNT +USBD3_HID6_IF_CNT +USBD3_HID7_IF_CNT)
#define USBD3_HID_EP_CNT                   (USBD3_HID0_EP_CNT +USBD3_HID1_EP_CNT +USBD3_HID2_EP_CNT +USBD3_HID3_EP_CNT +USBD3_HID4_EP_CNT +USBD3_HID5_EP_CNT +USBD3_HID6_EP_CNT +USBD3_HID7_EP_CNT)
#define USBD3_HID_STR_CNT                  (USBD3_HID0_STR_CNT+USBD3_HID1_STR_CNT+USBD3_HID2_STR_CNT+USBD3_HID3_STR_CNT+USBD3_HID4_STR_CNT+USBD3_HID5_STR_CNT+USBD3_HID6_STR_CNT+USBD3_HID7_STR_CNT)

#if    (defined(RTE_USB_Device_MSC_0) && (USBD_MSC0_DEV == 3))                  // USB Device 3 Mass Storage Class 0
#define USBD3_MSC0                          1
#define USBD3_MSC0_IF_CNT                   1
#define USBD3_MSC0_EP_CNT                   2
#define USBD3_MSC0_STR_CNT                  1
#define USBD_MSC0_HS                       (USBD3_HS)
#define USBD_MSC0_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID_IF_CNT)
#define USBD_MSC0_IF_CNT                   (USBD3_MSC0_IF_CNT)
#define USBD_MSC0_EP_CNT                   (USBD3_MSC0_EP_CNT)
#define USBD_MSC0_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID_STR_CNT)
#define USBD_MSC0_STR_CNT                  (USBD3_MSC0_STR_CNT)
#if    (USBD_MSC0_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC0_EP_BULK_IN)
#endif
#if    (USBD_MSC0_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC0_EP_BULK_OUT)
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  1) || (USBD_MSC0_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  2) || (USBD_MSC0_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  3) || (USBD_MSC0_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  4) || (USBD_MSC0_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  5) || (USBD_MSC0_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  6) || (USBD_MSC0_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  7) || (USBD_MSC0_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  8) || (USBD_MSC0_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN ==  9) || (USBD_MSC0_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN == 10) || (USBD_MSC0_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN == 11) || (USBD_MSC0_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN == 12) || (USBD_MSC0_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN == 13) || (USBD_MSC0_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN == 14) || (USBD_MSC0_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_msc_thread_id[0]
#endif
#if   ((USBD_MSC0_EP_BULK_IN == 15) || (USBD_MSC0_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_msc_thread_id[0]
#endif
#else
#define USBD3_MSC0                          0
#define USBD3_MSC0_IF_CNT                   0
#define USBD3_MSC0_EP_CNT                   0
#define USBD3_MSC0_STR_CNT                  0
#endif

#if    (defined(RTE_USB_Device_MSC_1) && (USBD_MSC1_DEV == 3))                  // USB Device 3 Mass Storage Class 1
#define USBD3_MSC1                          1
#define USBD3_MSC1_IF_CNT                   1
#define USBD3_MSC1_EP_CNT                   2
#define USBD3_MSC1_STR_CNT                  1
#define USBD_MSC1_HS                       (USBD3_HS)
#define USBD_MSC1_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID_IF_CNT+USBD3_MSC0_IF_CNT)
#define USBD_MSC1_IF_CNT                   (USBD3_MSC1_IF_CNT)
#define USBD_MSC1_EP_CNT                   (USBD3_MSC1_EP_CNT)
#define USBD_MSC1_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID_STR_CNT+USBD3_MSC0_STR_CNT)
#define USBD_MSC1_STR_CNT                  (USBD3_MSC1_STR_CNT)
#if    (USBD_MSC1_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC1_EP_BULK_IN)
#endif
#if    (USBD_MSC1_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC1_EP_BULK_OUT)
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  1) || (USBD_MSC1_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  2) || (USBD_MSC1_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  3) || (USBD_MSC1_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  4) || (USBD_MSC1_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  5) || (USBD_MSC1_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  6) || (USBD_MSC1_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  7) || (USBD_MSC1_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  8) || (USBD_MSC1_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN ==  9) || (USBD_MSC1_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN == 10) || (USBD_MSC1_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN == 11) || (USBD_MSC1_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN == 12) || (USBD_MSC1_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN == 13) || (USBD_MSC1_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN == 14) || (USBD_MSC1_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_msc_thread_id[1]
#endif
#if   ((USBD_MSC1_EP_BULK_IN == 15) || (USBD_MSC1_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_msc_thread_id[1]
#endif
#else
#define USBD3_MSC1                          0
#define USBD3_MSC1_IF_CNT                   0
#define USBD3_MSC1_EP_CNT                   0
#define USBD3_MSC1_STR_CNT                  0
#endif

#if    (defined(RTE_USB_Device_MSC_2) && (USBD_MSC2_DEV == 3))                  // USB Device 3 Mass Storage Class 2
#define USBD3_MSC2                          1
#define USBD3_MSC2_IF_CNT                   1
#define USBD3_MSC2_EP_CNT                   2
#define USBD3_MSC2_STR_CNT                  1
#define USBD_MSC2_HS                       (USBD3_HS)
#define USBD_MSC2_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID_IF_CNT+USBD3_MSC0_IF_CNT+USBD3_MSC1_IF_CNT)
#define USBD_MSC2_IF_CNT                   (USBD3_MSC2_IF_CNT)
#define USBD_MSC2_EP_CNT                   (USBD3_MSC2_EP_CNT)
#define USBD_MSC2_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID_STR_CNT+USBD3_MSC0_STR_CNT+USBD3_MSC1_STR_CNT)
#define USBD_MSC2_STR_CNT                  (USBD3_MSC2_STR_CNT)
#if    (USBD_MSC2_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC2_EP_BULK_IN)
#endif
#if    (USBD_MSC2_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC2_EP_BULK_OUT)
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  1) || (USBD_MSC2_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  2) || (USBD_MSC2_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  3) || (USBD_MSC2_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  4) || (USBD_MSC2_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  5) || (USBD_MSC2_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  6) || (USBD_MSC2_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  7) || (USBD_MSC2_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  8) || (USBD_MSC2_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN ==  9) || (USBD_MSC2_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN == 10) || (USBD_MSC2_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN == 11) || (USBD_MSC2_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN == 12) || (USBD_MSC2_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN == 13) || (USBD_MSC2_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN == 14) || (USBD_MSC2_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_msc_thread_id[2]
#endif
#if   ((USBD_MSC2_EP_BULK_IN == 15) || (USBD_MSC2_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_msc_thread_id[2]
#endif
#else
#define USBD3_MSC2                          0
#define USBD3_MSC2_IF_CNT                   0
#define USBD3_MSC2_EP_CNT                   0
#define USBD3_MSC2_STR_CNT                  0
#endif

#if    (defined(RTE_USB_Device_MSC_3) && (USBD_MSC3_DEV == 3))                  // USB Device 3 Mass Storage Class 3
#define USBD3_MSC3                          1
#define USBD3_MSC3_IF_CNT                   1
#define USBD3_MSC3_EP_CNT                   2
#define USBD3_MSC3_STR_CNT                  1
#define USBD_MSC3_HS                       (USBD3_HS)
#define USBD_MSC3_IF0_NUM                  (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID_IF_CNT+USBD3_MSC0_IF_CNT+USBD3_MSC1_IF_CNT+USBD3_MSC2_IF_CNT)
#define USBD_MSC3_IF_CNT                   (USBD3_MSC3_IF_CNT)
#define USBD_MSC3_EP_CNT                   (USBD3_MSC3_EP_CNT)
#define USBD_MSC3_IF0_STR_IDX              (USBD3_DEV_STR_CNT+USBD3_CUSTOM_CLASS_STR_CNT+USBD3_ADC_STR_CNT+USBD3_CDC_STR_CNT+USBD3_HID_STR_CNT+USBD3_MSC0_STR_CNT+USBD3_MSC1_STR_CNT+USBD3_MSC2_STR_CNT)
#define USBD_MSC3_STR_CNT                  (USBD3_MSC3_STR_CNT)
#if    (USBD_MSC3_EP_BULK_IN > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC3_EP_BULK_IN)
#endif
#if    (USBD_MSC3_EP_BULK_OUT > USBD3_EP_MAX)
#undef  USBD3_EP_MAX
#define USBD3_EP_MAX                       (USBD_MSC3_EP_BULK_OUT)
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  1) || (USBD_MSC3_EP_BULK_OUT ==  1))
#ifdef  USBD3_EP1
#error  Endpoint 1 on Device 3 is already used!
#endif
#define USBD3_EP1                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  2) || (USBD_MSC3_EP_BULK_OUT ==  2))
#ifdef  USBD3_EP2
#error  Endpoint 2 on Device 3 is already used!
#endif
#define USBD3_EP2                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  3) || (USBD_MSC3_EP_BULK_OUT ==  3))
#ifdef  USBD3_EP3
#error  Endpoint 3 on Device 3 is already used!
#endif
#define USBD3_EP3                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  4) || (USBD_MSC3_EP_BULK_OUT ==  4))
#ifdef  USBD3_EP4
#error  Endpoint 4 on Device 3 is already used!
#endif
#define USBD3_EP4                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  5) || (USBD_MSC3_EP_BULK_OUT ==  5))
#ifdef  USBD3_EP5
#error  Endpoint 5 on Device 3 is already used!
#endif
#define USBD3_EP5                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  6) || (USBD_MSC3_EP_BULK_OUT ==  6))
#ifdef  USBD3_EP6
#error  Endpoint 6 on Device 3 is already used!
#endif
#define USBD3_EP6                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  7) || (USBD_MSC3_EP_BULK_OUT ==  7))
#ifdef  USBD3_EP7
#error  Endpoint 7 on Device 3 is already used!
#endif
#define USBD3_EP7                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  8) || (USBD_MSC3_EP_BULK_OUT ==  8))
#ifdef  USBD3_EP8
#error  Endpoint 8 on Device 3 is already used!
#endif
#define USBD3_EP8                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN ==  9) || (USBD_MSC3_EP_BULK_OUT ==  9))
#ifdef  USBD3_EP9
#error  Endpoint 9 on Device 3 is already used!
#endif
#define USBD3_EP9                          &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN == 10) || (USBD_MSC3_EP_BULK_OUT == 10))
#ifdef  USBD3_EP10
#error  Endpoint 10 on Device 3 is already used!
#endif
#define USBD3_EP10                         &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN == 11) || (USBD_MSC3_EP_BULK_OUT == 11))
#ifdef  USBD3_EP11
#error  Endpoint 11 on Device 3 is already used!
#endif
#define USBD3_EP11                         &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN == 12) || (USBD_MSC3_EP_BULK_OUT == 12))
#ifdef  USBD3_EP12
#error  Endpoint 12 on Device 3 is already used!
#endif
#define USBD3_EP12                         &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN == 13) || (USBD_MSC3_EP_BULK_OUT == 13))
#ifdef  USBD3_EP13
#error  Endpoint 13 on Device 3 is already used!
#endif
#define USBD3_EP13                         &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN == 14) || (USBD_MSC3_EP_BULK_OUT == 14))
#ifdef  USBD3_EP14
#error  Endpoint 14 on Device 3 is already used!
#endif
#define USBD3_EP14                         &usbd_msc_thread_id[3]
#endif
#if   ((USBD_MSC3_EP_BULK_IN == 15) || (USBD_MSC3_EP_BULK_OUT == 15))
#ifdef  USBD3_EP15
#error  Endpoint 15 on Device 3 is already used!
#endif
#define USBD3_EP15                         &usbd_msc_thread_id[3]
#endif
#else
#define USBD3_MSC3                          0
#define USBD3_MSC3_IF_CNT                   0
#define USBD3_MSC3_EP_CNT                   0
#define USBD3_MSC3_STR_CNT                  0
#endif

#define USBD3_MSC_CNT                      (USBD3_MSC0+USBD3_MSC1+USBD3_MSC2+USBD3_MSC3)
#define USBD3_MSC_IF_CNT                   (USBD3_MSC0_IF_CNT +USBD3_MSC1_IF_CNT +USBD3_MSC2_IF_CNT +USBD3_MSC3_IF_CNT)
#define USBD3_MSC_EP_CNT                   (USBD3_MSC0_EP_CNT +USBD3_MSC1_EP_CNT +USBD3_MSC2_EP_CNT +USBD3_MSC3_EP_CNT)
#define USBD3_MSC_STR_CNT                  (USBD3_MSC0_STR_CNT+USBD3_MSC1_STR_CNT+USBD3_MSC2_STR_CNT+USBD3_MSC3_STR_CNT)

#define USBD3_ANY                         ((USBD3_CUSTOM_CLASS_CNT + USBD3_ADC_CNT + USBD3_CDC_CNT + USBD3_HID_CNT + USBD3_MSC_CNT) != 0)

#define USBD3_IF_CNT                       (USBD3_CUSTOM_CLASS_IF_CNT+USBD3_ADC_IF_CNT+USBD3_CDC_IF_CNT+USBD3_HID_IF_CNT+USBD3_MSC_IF_CNT)
#define USBD3_EP_CNT                       (USBD3_CUSTOM_CLASS_EP_CNT+USBD3_ADC_EP_CNT+USBD3_CDC_EP_CNT+USBD3_HID_EP_CNT+USBD3_MSC_EP_CNT)

#define USBD3_USE_IAD                    (((USBD3_CDC_CNT>0)&((USBD3_CUSTOM_CLASS_CNT + USBD3_ADC_CNT + USBD3_HID_CNT + USBD3_MSC_CNT) != 0)) | \
                                           (USBD3_CDC_CNT>1)                                                                                  | \
                                           (USBD3_CDC_USE_IAD!=0)                                                                             | \
                                           (USBD3_CUSTOM_CLASS0_IAD_EN!=0)                                                                    | \
                                           (USBD3_CUSTOM_CLASS1_IAD_EN!=0)                                                                    | \
                                           (USBD3_CUSTOM_CLASS2_IAD_EN!=0)                                                                    | \
                                           (USBD3_CUSTOM_CLASS3_IAD_EN!=0)                                                                    )

#define USBD3_CUSTOM_CLASS_DESC_LEN       ((USBD3_CUSTOM_CLASS0 *                                                           \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE * USBD3_CUSTOM_CLASS0_IAD_EN +    \
                                            USBD3_CUSTOM_CLASS0_IF_DESC_CNT * USB_INTERFACE_DESC_SIZE +                     \
                                            USBD3_CUSTOM_CLASS0_EP_CNT * USB_ENDPOINT_DESC_SIZE)) +                         \
                                           (USBD3_CUSTOM_CLASS1 *                                                           \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE * USBD3_CUSTOM_CLASS1_IAD_EN +    \
                                            USBD3_CUSTOM_CLASS1_IF_DESC_CNT * USB_INTERFACE_DESC_SIZE +                     \
                                            USBD3_CUSTOM_CLASS1_EP_CNT * USB_ENDPOINT_DESC_SIZE)) +                         \
                                           (USBD3_CUSTOM_CLASS2 *                                                           \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE * USBD3_CUSTOM_CLASS2_IAD_EN +    \
                                            USBD3_CUSTOM_CLASS2_IF_DESC_CNT * USB_INTERFACE_DESC_SIZE +                     \
                                            USBD3_CUSTOM_CLASS2_EP_CNT * USB_ENDPOINT_DESC_SIZE)) +                         \
                                           (USBD3_CUSTOM_CLASS3 *                                                           \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE * USBD3_CUSTOM_CLASS3_IAD_EN +    \
                                            USBD3_CUSTOM_CLASS3_IF_DESC_CNT * USB_INTERFACE_DESC_SIZE +                     \
                                            USBD3_CUSTOM_CLASS3_EP_CNT * USB_ENDPOINT_DESC_SIZE)))
#define USBD3_ADC_DESC_LEN                ((USBD3_ADC0 *                                                                    \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE +                                 \
                                            USB_INTERFACE_DESC_SIZE +                                                       \
                                           (USBD3_ADC0_IF_SPKR || USBD3_ADC0_IF_MIC) *                                      \
                                            AUDIO_CONTROL_INTERFACE_DESC_SZ(USBD3_ADC0_IF_SPKR + USBD3_ADC0_IF_MIC) +       \
                                           (USBD3_ADC0_IF_SPKR *                                                            \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC0_OUT_CH_NUM,1) +                           \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)) +      \
                                           (USBD3_ADC0_IF_MIC *                                                             \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC0_IN_CH_NUM,1) +                            \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)))) +    \
                                           (USBD3_ADC1 *                                                                    \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE +                                 \
                                            USB_INTERFACE_DESC_SIZE +                                                       \
                                           (USBD3_ADC1_IF_SPKR || USBD3_ADC1_IF_MIC) *                                      \
                                            AUDIO_CONTROL_INTERFACE_DESC_SZ(USBD3_ADC1_IF_SPKR + USBD3_ADC1_IF_MIC) +       \
                                           (USBD3_ADC1_IF_SPKR *                                                            \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC1_OUT_CH_NUM,1) +                           \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)) +      \
                                           (USBD3_ADC1_IF_MIC *                                                             \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC1_IN_CH_NUM,1) +                            \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)))) +    \
                                           (USBD3_ADC2 *                                                                    \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE +                                 \
                                            USB_INTERFACE_DESC_SIZE +                                                       \
                                           (USBD3_ADC2_IF_SPKR || USBD3_ADC2_IF_MIC) *                                      \
                                            AUDIO_CONTROL_INTERFACE_DESC_SZ(USBD3_ADC2_IF_SPKR + USBD3_ADC2_IF_MIC) +       \
                                           (USBD3_ADC2_IF_SPKR *                                                            \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC2_OUT_CH_NUM,1) +                           \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)) +      \
                                           (USBD3_ADC2_IF_MIC *                                                             \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC2_IN_CH_NUM,1) +                            \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)))) +    \
                                           (USBD3_ADC3 *                                                                    \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE +                                 \
                                            USB_INTERFACE_DESC_SIZE +                                                       \
                                           (USBD3_ADC3_IF_SPKR || USBD3_ADC3_IF_MIC) *                                      \
                                            AUDIO_CONTROL_INTERFACE_DESC_SZ(USBD3_ADC3_IF_SPKR + USBD3_ADC3_IF_MIC) +       \
                                           (USBD3_ADC3_IF_SPKR *                                                            \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC3_OUT_CH_NUM,1) +                           \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)) +      \
                                           (USBD3_ADC3_IF_MIC *                                                             \
                                           (AUDIO_INPUT_TERMINAL_DESC_SIZE +                                                \
                                            AUDIO_FEATURE_UNIT_DESC_SZ(USBD3_ADC3_IN_CH_NUM,1) +                            \
                                            AUDIO_OUTPUT_TERMINAL_DESC_SIZE + USB_INTERFACE_DESC_SIZE * 2 +                 \
                                            AUDIO_STREAMING_INTERFACE_DESC_SIZE + AUDIO_FORMAT_TYPE_I_DESC_SZ(1) +          \
                                            AUDIO_STANDARD_ENDPOINT_DESC_SIZE + AUDIO_STREAMING_ENDPOINT_DESC_SIZE)))))
#define USBD3_CDC_DESC_LEN                ((USBD3_CDC_ACM_CNT *                                                             \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE +                                 \
                                            USB_INTERFACE_DESC_SIZE + 19 + USB_ENDPOINT_DESC_SIZE +                         \
                                            USB_INTERFACE_DESC_SIZE + 2* USB_ENDPOINT_DESC_SIZE)) +                         \
                                           (USBD3_CDC_NCM_CNT *                                                             \
                                           (USBD3_USE_IAD * USB_INTERFACE_ASSOC_DESC_SIZE +                                 \
                                            USB_INTERFACE_DESC_SIZE + 29 + USB_ENDPOINT_DESC_SIZE +                         \
                                            2 * USB_INTERFACE_DESC_SIZE  + 2* USB_ENDPOINT_DESC_SIZE)))
#if (USBD3_HID0 == 1)
#define USBD3_HID0_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID0_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID0_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN)
#define USBD_HID0_DESC_LEN                 (USBD3_HID0_DESC_LEN)
#define USBD_HID0_DESC_OFS                 (USBD3_HID0_DESC_OFS)
#else
#define USBD3_HID0_DESC_LEN                (0)
#define USBD3_HID0_DESC_OFS                (0)
#endif
#if (USBD3_HID1 == 1)
#define USBD3_HID1_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID1_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID1_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN)
#define USBD_HID1_DESC_LEN                 (USBD3_HID1_DESC_LEN)
#define USBD_HID1_DESC_OFS                 (USBD3_HID1_DESC_OFS)
#else
#define USBD3_HID1_DESC_LEN                (0)
#define USBD3_HID1_DESC_OFS                (0)
#endif
#if (USBD3_HID2 == 1)
#define USBD3_HID2_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID2_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID2_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN  +                                                          \
                                            USBD3_HID1_DESC_LEN)
#define USBD_HID2_DESC_LEN                 (USBD3_HID2_DESC_LEN)
#define USBD_HID2_DESC_OFS                 (USBD3_HID2_DESC_OFS)
#else
#define USBD3_HID2_DESC_LEN                (0)
#define USBD3_HID2_DESC_OFS                (0)
#endif
#if (USBD3_HID3 == 1)
#define USBD3_HID3_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID3_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID3_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN  +                                                          \
                                            USBD3_HID1_DESC_LEN  +                                                          \
                                            USBD3_HID2_DESC_LEN)
#define USBD_HID3_DESC_LEN                 (USBD3_HID3_DESC_LEN)
#define USBD_HID3_DESC_OFS                 (USBD3_HID3_DESC_OFS)
#else
#define USBD3_HID3_DESC_LEN                (0)
#define USBD3_HID3_DESC_OFS                (0)
#endif
#if (USBD3_HID4 == 1)
#define USBD3_HID4_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID4_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID4_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN  +                                                          \
                                            USBD3_HID1_DESC_LEN  +                                                          \
                                            USBD3_HID2_DESC_LEN  +                                                          \
                                            USBD3_HID3_DESC_LEN)
#define USBD_HID4_DESC_LEN                 (USBD3_HID4_DESC_LEN)
#define USBD_HID4_DESC_OFS                 (USBD3_HID4_DESC_OFS)
#else
#define USBD3_HID4_DESC_LEN                (0)
#define USBD3_HID4_DESC_OFS                (0)
#endif
#if (USBD3_HID5 == 1)
#define USBD3_HID5_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID5_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID5_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN  +                                                          \
                                            USBD3_HID1_DESC_LEN  +                                                          \
                                            USBD3_HID2_DESC_LEN  +                                                          \
                                            USBD3_HID3_DESC_LEN  +                                                          \
                                            USBD3_HID4_DESC_LEN)
#define USBD_HID5_DESC_LEN                 (USBD3_HID5_DESC_LEN)
#define USBD_HID5_DESC_OFS                 (USBD3_HID5_DESC_OFS)
#else
#define USBD3_HID5_DESC_LEN                (0)
#define USBD3_HID5_DESC_OFS                (0)
#endif
#if (USBD3_HID6 == 1)
#define USBD3_HID6_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID6_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID6_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN  +                                                          \
                                            USBD3_HID1_DESC_LEN  +                                                          \
                                            USBD3_HID2_DESC_LEN  +                                                          \
                                            USBD3_HID3_DESC_LEN  +                                                          \
                                            USBD3_HID4_DESC_LEN  +                                                          \
                                            USBD3_HID5_DESC_LEN)
#define USBD_HID6_DESC_LEN                 (USBD3_HID6_DESC_LEN)
#define USBD_HID6_DESC_OFS                 (USBD3_HID6_DESC_OFS)
#else
#define USBD3_HID6_DESC_LEN                (0)
#define USBD3_HID6_DESC_OFS                (0)
#endif
#if (USBD3_HID7 == 1)
#define USBD3_HID7_DESC_LEN                (USB_INTERFACE_DESC_SIZE + USB_HID_DESC_SIZE +                                   \
                                            USBD_HID7_EP_CNT * USB_ENDPOINT_DESC_SIZE)
#define USBD3_HID7_DESC_OFS                (USB_CONFIGURATION_DESC_SIZE + USB_INTERFACE_DESC_SIZE +                         \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID0_DESC_LEN  +                                                          \
                                            USBD3_HID1_DESC_LEN  +                                                          \
                                            USBD3_HID2_DESC_LEN  +                                                          \
                                            USBD3_HID3_DESC_LEN  +                                                          \
                                            USBD3_HID4_DESC_LEN  +                                                          \
                                            USBD3_HID5_DESC_LEN  +                                                          \
                                            USBD3_HID6_DESC_LEN)
#define USBD_HID7_DESC_LEN                 (USBD3_HID7_DESC_LEN)
#define USBD_HID7_DESC_OFS                 (USBD3_HID7_DESC_OFS)
#else
#define USBD3_HID7_DESC_LEN                (0)
#define USBD3_HID7_DESC_OFS                (0)
#endif

#define USBD3_HID_DESC_LEN                 (USBD3_HID0_DESC_LEN +                                                           \
                                            USBD3_HID1_DESC_LEN +                                                           \
                                            USBD3_HID2_DESC_LEN +                                                           \
                                            USBD3_HID3_DESC_LEN +                                                           \
                                            USBD3_HID4_DESC_LEN +                                                           \
                                            USBD3_HID5_DESC_LEN +                                                           \
                                            USBD3_HID6_DESC_LEN +                                                           \
                                            USBD3_HID7_DESC_LEN )
#define USBD3_MSC_DESC_LEN                 (USBD3_MSC_CNT    * USB_INTERFACE_DESC_SIZE +                                    \
                                            USBD3_MSC_EP_CNT * USB_ENDPOINT_DESC_SIZE)

#define USBD3_WTOTALLENGTH                 (USB_CONFIGURATION_DESC_SIZE +                                                   \
                                            USBD3_CUSTOM_CLASS_DESC_LEN +                                                   \
                                            USBD3_ADC_DESC_LEN   +                                                          \
                                            USBD3_CDC_DESC_LEN   +                                                          \
                                            USBD3_HID_DESC_LEN   +                                                          \
                                            USBD3_MSC_DESC_LEN   )

#define USBD3_BDC_USB                       0x0200

#if ((defined(USBD3_HS) && (USBD3_HS != 0)) && (defined(USBD3_MAX_PACKET0) && (USBD3_MAX_PACKET0 != 64)))
#error Device 3 High-speed setting requires Maximum Endpoint 0 Packet Size of 64 bytes!
#endif

#endif  // USBD_CONFIG_DEF_3_H_
